+ Reply to Thread
Results 1 to 6 of 6

IF formula comparing values in 2 cells

  1. #1
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    Question IF formula comparing values in 2 cells

    I have 2 columns worth of data.

    Column A is always supposed to have a larger value than Column B.
    If Column B has a value larger than what's in Column A (same row), then this is wrong.

    NOTE: Sometimes Column B will be blank, and that is ok.


    How do I say (via formula), IF B1 has a larger value than A1, then in C1 put in "Not OK". If it's ok, put in GOOD.
    When I drag this formula down to the other rows, the cells in column B that are blank will throw the error that Column B is larger than column A.
    How do I fix this?

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF formula comparing values in 2 cells

    Try this
    Enter in C1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    Re: IF formula comparing values in 2 cells

    Its almost there.

    When I have blanks in B1, it will give me the Not Ok answer.
    Whenever I have blanks in B1, that is ok.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF formula comparing values in 2 cells

    I don't see this happening. When B1 is blank and A1 contains value formula returns Blank; IF A1 is blank and B1 has value the formula returns Blank.
    v A B C D
    1 11 <--Blank
    2 12 13 Not Ok
    3 14 5 Good
    4 15 <--Blank

  5. #5
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    Re: IF formula comparing values in 2 cells

    Never mind... it works now.

  6. #6
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    Re: IF formula comparing values in 2 cells

    Thanks you Alkey. I will post as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. comparing values of cells
    By thunderspeed in forum Excel General
    Replies: 4
    Last Post: 11-21-2015, 10:44 AM
  2. [SOLVED] Formula to copy cells with highest values in a new Column by comparing 41 Columns
    By lagiosman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2014, 12:41 PM
  3. [SOLVED] Need formula to find the next value in series by comparing values of adjacent cells
    By warriorpoet7176 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 06:55 AM
  4. Returning different values when comparing 2 cells
    By Carl1966 in forum Excel General
    Replies: 1
    Last Post: 09-09-2008, 08:15 AM
  5. Comparing values in Cells
    By ktsugihara in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-31-2008, 05:18 PM
  6. Comparing values in cells between three worksheets
    By SlipperyPete in forum Excel General
    Replies: 2
    Last Post: 12-10-2007, 04:29 PM
  7. Comparing Values from 2 cells
    By Reggie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2005, 03:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1