cyrilbrd
Well-known Member
- Joined
- Feb 2, 2012
- Messages
- 4,113
- Office Version
- 365
- Platform
- Windows
- Mobile
Given in A1:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 325"]
<colgroup><col style="width:65pt" span="5" width="65"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 65"]identifier[/TD]
[TD="class: xl63, width: 65"]R1
[/TD]
[TD="class: xl63, width: 65"]R2[/TD]
[TD="class: xl63, width: 65"]R3[/TD]
[TD="class: xl63, width: 65"]R4[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]16
[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]23[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]12[/TD]
[TD="class: xl63"]55[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]34
[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]55[/TD]
[TD="class: xl63"]56[/TD]
[TD="class: xl63"]100[/TD]
[TD="class: xl63"]89[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]80
[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]45[/TD]
[TD="class: xl63"]78[/TD]
[TD="class: xl63"]83[/TD]
[TD="class: xl63"]93[/TD]
[/TR]
</tbody>[/TABLE]
formula in A2 is =IF(AND(B2>C2,D2>E2),"yes","") hence conditions for the row are R1 superior to R2 AND R3 superior to R4.
Result Expected in G1:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 390"]
<colgroup><col style="width:65pt" span="6" width="65"> </colgroup><tbody>[TR]
[TD="width: 65"][/TD]
[TD="class: xl63, width: 65"][/TD]
[TD="class: xl63, width: 65"]R1_r
[/TD]
[TD="class: xl63, width: 65"]R2_r
[/TD]
[TD="class: xl63, width: 65"]R3_r
[/TD]
[TD="class: xl63, width: 65"]R4_r
[/TD]
[/TR]
[TR]
[TD]result[/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]80[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
</tbody>[/TABLE]
formula presently used in H2 is =IF(ROWS($H$2:H2)>SUMPRODUCT(--(B:B>C:C),--(D:D>E:E)),"","yes") CSE copied down till needed
formula presently used in I2 is =IF(ROWS(I$2:I2)>SUMPRODUCT(--($B:$B>$C:$C),--($D:$D>$E:$E)),"",INDEX(B:B,SMALL(IF($A$2:$A$7=$H2,ROW($A$2:$A$7)),ROWS(I$2:I2)))) CSE copied right till Column L and down till needed.
NOTE:
The above scenario in A1 involves the use of a helper column in A returning either a 'yes' or a blank
The above results in G1 make use of Column A in order to retrieve all INDEX whenever the condition is met
QUESTION:
Could it be possible to invoke the two conditions within the search formula thus removing the need of Column A while returning all values fitting the conditions:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 390"]
<colgroup><col style="width:65pt" span="6" width="65"> </colgroup><tbody>[TR]
[TD="width: 65"]count[/TD]
[TD="class: xl63, width: 65"]3[/TD]
[TD="class: xl63, width: 65"]R1[/TD]
[TD="class: xl63, width: 65"]R2[/TD]
[TD="class: xl63, width: 65"]R3[/TD]
[TD="class: xl63, width: 65"]R4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]Result
[/TD]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]80[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
</tbody>[/TABLE]
Count would be =SUMPRODUCT(--(B:B>C:C),--(D:D>E:E)) CSE
but what would be the formula in I2?
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 325"]
<colgroup><col style="width:65pt" span="5" width="65"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 65"]identifier[/TD]
[TD="class: xl63, width: 65"]R1
[/TD]
[TD="class: xl63, width: 65"]R2[/TD]
[TD="class: xl63, width: 65"]R3[/TD]
[TD="class: xl63, width: 65"]R4[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]16
[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]23[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]12[/TD]
[TD="class: xl63"]55[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]34
[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]55[/TD]
[TD="class: xl63"]56[/TD]
[TD="class: xl63"]100[/TD]
[TD="class: xl63"]89[/TD]
[/TR]
[TR]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]80
[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"]45[/TD]
[TD="class: xl63"]78[/TD]
[TD="class: xl63"]83[/TD]
[TD="class: xl63"]93[/TD]
[/TR]
</tbody>[/TABLE]
formula in A2 is =IF(AND(B2>C2,D2>E2),"yes","") hence conditions for the row are R1 superior to R2 AND R3 superior to R4.
Result Expected in G1:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 390"]
<colgroup><col style="width:65pt" span="6" width="65"> </colgroup><tbody>[TR]
[TD="width: 65"][/TD]
[TD="class: xl63, width: 65"][/TD]
[TD="class: xl63, width: 65"]R1_r
[/TD]
[TD="class: xl63, width: 65"]R2_r
[/TD]
[TD="class: xl63, width: 65"]R3_r
[/TD]
[TD="class: xl63, width: 65"]R4_r
[/TD]
[/TR]
[TR]
[TD]result[/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]yes[/TD]
[TD="class: xl63"]80[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
</tbody>[/TABLE]
formula presently used in H2 is =IF(ROWS($H$2:H2)>SUMPRODUCT(--(B:B>C:C),--(D:D>E:E)),"","yes") CSE copied down till needed
formula presently used in I2 is =IF(ROWS(I$2:I2)>SUMPRODUCT(--($B:$B>$C:$C),--($D:$D>$E:$E)),"",INDEX(B:B,SMALL(IF($A$2:$A$7=$H2,ROW($A$2:$A$7)),ROWS(I$2:I2)))) CSE copied right till Column L and down till needed.
NOTE:
The above scenario in A1 involves the use of a helper column in A returning either a 'yes' or a blank
The above results in G1 make use of Column A in order to retrieve all INDEX whenever the condition is met
QUESTION:
Could it be possible to invoke the two conditions within the search formula thus removing the need of Column A while returning all values fitting the conditions:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl63 { text-align: center; }</style> [TABLE="width: 390"]
<colgroup><col style="width:65pt" span="6" width="65"> </colgroup><tbody>[TR]
[TD="width: 65"]count[/TD]
[TD="class: xl63, width: 65"]3[/TD]
[TD="class: xl63, width: 65"]R1[/TD]
[TD="class: xl63, width: 65"]R2[/TD]
[TD="class: xl63, width: 65"]R3[/TD]
[TD="class: xl63, width: 65"]R4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"]Result
[/TD]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]15[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]53[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]14[/TD]
[TD="class: xl63"]54[/TD]
[TD="class: xl63"]50[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]80[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]24[/TD]
[/TR]
</tbody>[/TABLE]
Count would be =SUMPRODUCT(--(B:B>C:C),--(D:D>E:E)) CSE
but what would be the formula in I2?