• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

IF condition is not met, then check on next row

imegut0421

New Member
Hi. Help please. I want to summarized all the "Apples" to be inputted in consecutive rows. I attached sample data where cell A3= Apples, A4=Apples, A5=Banana, A6= Banana, A7= Banana and A8=Apples. Using the if then formula on column D, it will go like this:

D3= Apples
D4= Apples
D5= 0
D6= 0
D7= 0
D8 = Apples

But I want my report to be:

D3= Apples
D4= Apples
D5= Apples (being the D5 to D7 is zero, so it should jump to the next row with Apples).

Please help. Thanks.
 

Attachments

  • Apples and Banana.xlsx
    10.5 KB · Views: 26
This is fairly straightforward if you have FILTER formula available to you which will work like below. In cell E3:
=FILTER(D3:D10,A3:A10="Apples")

If you do not have access to FILTER formula or you need to maintain compatibility with older versions of Excel then you can use below Array formula (to be committed by pressing CTRL+SHIFT+ENTER) and copy down as much needed.
=IFERROR(INDEX($C$1:$C$10,SMALL(IF($A$1:$A$10="Apples",ROW($A$1:$A$10),10^10),ROWS($A$1:$A1))),"")
 
Hi. I appreciate all the help you extended. Thank you.

Ahm, can I request for one more favor? Using the "if then" formula, I can't get the result that I want on columns F, G , and H. I do not know what I am doing wrong.. so, please,, help me on this too.

Thanks in advance.
 

Attachments

  • Apples and Bananav.2.xlsx
    11.4 KB · Views: 12
Back
Top