Skip the row if logical condition is not met

maitreyeepurohit

New Member
Joined
Sep 12, 2017
Messages
2
[TABLE="width: 496"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD] A
Current Month of PW[/TD]
[TD]B
CODE
[/TD]
[TD]C
PNC[/TD]
[/TR]
[TR]
[TD]1 9[/TD]
[TD]SF-AY1-0001-K1-1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2 7[/TD]
[TD]SF-AY1-0002-Alindra-1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3 9[/TD]
[TD]SF-AY1-0003-K1-2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4 0[/TD]
[TD]SF-AY1-0004-K1-3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5 0[/TD]
[TD]SF-AY1-0005-K1-4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I Basically want only the codes which have current Month of PW as 9.
Thanks a lot in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]Current Month of PW[/TD]
[TD]CODE[/TD]
[TD]PNC[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
9​
[/TD]
[TD]SF-AY1-0001-K1-1[/TD]
[TD]SF-AY1-0001-K1-1[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
7​
[/TD]
[TD]SF-AY1-0002-Alindra-1[/TD]
[TD]SF-AY1-0003-K1-2[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
9​
[/TD]
[TD]SF-AY1-0003-K1-2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
0​
[/TD]
[TD]SF-AY1-0004-K1-3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
0​
[/TD]
[TD]SF-AY1-0005-K1-4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

c2=IFERROR(INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A$2,ROW($B$2:$B$6)-ROW($B$2)+1),ROWS($B$2:B2))),"")

control+shift+enter copy down
 
Upvote 0
Thank you very much!!! This worked Perfectly!

[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]Current Month of PW[/TD]
[TD]CODE[/TD]
[TD]PNC[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
9​
[/TD]
[TD]SF-AY1-0001-K1-1[/TD]
[TD]SF-AY1-0001-K1-1[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
7​
[/TD]
[TD]SF-AY1-0002-Alindra-1[/TD]
[TD]SF-AY1-0003-K1-2[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
9​
[/TD]
[TD]SF-AY1-0003-K1-2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
0​
[/TD]
[TD]SF-AY1-0004-K1-3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
0​
[/TD]
[TD]SF-AY1-0005-K1-4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

c2=IFERROR(INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A$2,ROW($B$2:$B$6)-ROW($B$2)+1),ROWS($B$2:B2))),"")

control+shift+enter copy down
 
Upvote 0
use this one

c2=IFERROR(INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=9,ROW($B$2:$B$6)-ROW($B$2)+1),ROWS($B$2:B2))),"") control +shift+enter copy down
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top