• 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 statement

MAH

New Member
There are have 3 retailers the stock products I have a list if any of the items are at risk of deletion by any on the 3 retailers. In my Deletion column I want to identify if the product is safe from deletion or if it is at risk of deletion from any of the 3 retailers.
 

Attachments

  • Book3.xlsx
    9.4 KB · Views: 6
If the text in any of the retailers says Immediate Deletion or Mid-High Deletion the deletion column should then say yes.

If all the retailer columns contain text saying either not ranged or safe then the deletion column should say no.
 
Try,

In G2, copied down :

=IF(SUMPRODUCT(0+(RIGHT(D2:F2)="n"))>0,"yes","no")

Regards
Bosco
 

Attachments

  • Book3(Sumproduct).xlsx
    11.1 KB · Views: 12
Thank you so much so I can do this next time could you explain to me how this formula works
 
Thank you so much so I can do this next time could you explain to me how this formula works
This is your condition :

If any retailers contains "Immediate Deletion" or "Mid-High Deletion" ="yes"

Else, ="No"

Then,

it can also say :

If any retailers cell last letter contains "n" ="yes"

Else, ="No"

So,

For example in G2 formula:

=IF(SUMPRODUCT(0+(RIGHT(D2:F2)="n"))>0,"yes","no")

>> become >>

=IF(SUMPRODUCT(0+(RIGHT({"Safe","Not Ranged","Immediate Deletion"})="n"))>0,"yes","no")

This part RIGHT(D2:F2) extract last letter of each cell

=IF(SUMPRODUCT(0+({"e","d","n"}="n"))>0,"yes","no")

>> become >>

=IF(SUMPRODUCT(0+({FALSE,FALSE,TRUE}))>0,"yes","no")

>> become >>

=IF(SUMPRODUCT({0,0,1})>0,"yes","no")

>> become >>

=IF(1>0,"yes","no")

>> become >>

="yes" (desired result)

Regards
Bosco
 
Back
Top