ROn
ROn

Reputation: 139

Using IF AND statement in Excel formula doesn't work

Image 1

Hello All,

I've alter question in simpler way.

Right now I'm working on image where Col A & B has some values. I've to find values in Col C, where if Col A values "No Windows" & Col B values "No SQL".

I've used formula of IF AND statement in Col C. The Col C will represent it as "Yes" where Col A values "No Windows" & Col B values "No SQL" else formula will reflect it as "no".

For reference: In Col D represent the actual result needed after formula is applied.

Formula used : IF AND statement in Excel

=IF(AND(A2="No Windows",B2="No SQL"),"Yes","no")

Upvotes: 0

Views: 307

Answers (1)

Solar Mike
Solar Mike

Reputation: 8375

So sometimes the data tested has leading or trailing spaces, try using trim() like this:

=IF(AND(trim(A2)="No Windows",trim(B2)="No SQL"),"Yes","no")

Upvotes: 2

Related Questions