Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

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
0
wrt1mea
Asked:
wrt1mea
  • 2
  • 2
1 Solution
 
sah18Commented:
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?
0
 
McOzCommented:
use this:

=IF(VALUE(LEFT(A2,2))=A1,"YES","NO")

otherwise it is trying to compare a string to a number.

McOz
0
 
wrt1meaAuthor Commented:
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.
0
 
wrt1meaAuthor Commented:
WORKS GREAT!
0
 
sah18Commented:
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.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now