Link to home
Start Free TrialLog in
Avatar of wrt1mea
wrt1mea

asked on

I need an excel formula

I need an excel formula to look at two different cells and see if they have the same data. However, once cell is formatted with just "12" and the other is formatted as "12th."

I have tried using the following that are not working, returning NO when it should be YES

=IF(A1=A2,"YES","NO")
=IF(RIGHT(A2,2)=A1,"YES","NO")

See attached.
10-6-11.xlsx
Avatar of sah18
sah18
Flag of United States of America image

Well, 12 and 12th are not the same.  Are you wanting them to be considered to be the same?  What other types of data will you have in your column?
ASKER CERTIFIED SOLUTION
Avatar of McOz
McOz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wrt1mea
wrt1mea

ASKER

What I am tryiing to do is using a count function on a sheet to make sure end users have entered something in for everyday of the month. So when the count returns 31 for the total days in October, I need it to look at the last cell that has "31st" and tell me YES or NO.
Avatar of wrt1mea

ASKER

WORKS GREAT!
Ahh, that is clearer now.  The equation provided by McOz above will do what you want.
Let us know if that is not what you intended.