Help with IF Statement

edam4i

New Member
Joined
Jul 28, 2018
Messages
11
How do I get to check two cells if they match and then return a value?

I'm using an Id Statement but it's working for 2 out of 3 scenarios.

=IF(A1=B1,1,0)

A1 B1 C1
HAM HAM 0
BEEF BEEF 1
TURKEY TURKEY 1

The If Statement works on BEEF=BEEF and TURKEY=TURKEY but not HAM=HAM?

Please help!
Colin
 
Not that this will solve your problem, but if you are actually entering only 1, 2, or 3 you could use:

=CHOOSE(A1+1,"","Ham","Turkey","Beef")


and the IF statement can deal with numbers or letters, so I'm still not getting a sense of your problem

What do you mean by this:

When I input words instead of numbers and match everything works fine but I need to use a mixture so maybe the IF Statement isn't suitable?
any suggestions?

Can you explain?

Make sure if you are entering a number in a formula do not put it in quotes i.e. "1" unless you want it to be text
 
Last edited:
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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