I need an excel formula

Posted on 2011-10-06
Last Modified: 2012-05-12
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


See attached.
Question by:wrt1mea
    LVL 9

    Expert Comment

    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?
    LVL 9

    Accepted Solution

    use this:


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

    LVL 1

    Author Comment

    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.
    LVL 1

    Author Closing Comment

    LVL 9

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now