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
Microsoft Excel

Avatar of undefined
Last Comment
sah18

8/22/2022 - Mon
sah18

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
McOz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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.
wrt1mea

ASKER
WORKS GREAT!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
sah18

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.