+ Reply to Thread
Results 1 to 6 of 6

IF statement using formula not value

  1. #1
    Registered User
    Join Date
    06-10-2013
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    79

    IF statement using formula not value

    I have an if statement,
    HTML Code: 
    This IF statement is comparing dates in column C and Column A. However in column C and Column A are vlookup statements so the are never equal. is there a way to make the formula look at the value in the cell and note the vlookup formula?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF statement using formula not value

    Formulas do look at the value in the cell (wether it's entered by hand or the result of a formula doesn't matter)
    What matters is what the result of the formula actually is.

    It's llikely that the result of your vlookup isn't really a Number, but a Number stored as text.

    Also, your AND statement is redundant..
    If C2 is Greater than A2, then certainly it is already determined to be NOT equal to A2..
    So you just need
    =IF(C2>A2, "WORKS", "DOESN’T WORK")

    Can you post the formulas in C2 and A2 ?

  3. #3
    Registered User
    Join Date
    06-10-2013
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: IF statement using formula not value

    I was incorrect when i marked this as solved
    Last edited by onbeillp111; 03-26-2014 at 03:36 PM.

  4. #4
    Registered User
    Join Date
    06-10-2013
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: IF statement using formula not value

    My Mistake, it still doesnt work properly, I attached an example, if you look at the data tab, row 6 should be "doesn't work" because C2 = A2.
    Attached Files Attached Files

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF statement using formula not value

    You don't have a formula in column D on the Data Tab...(or in the entire book for that matter)

    However, when I put this formula in D2 and fill down
    =IF(C2>A2, "WORKS", "DOESN’T WORK")
    It produces the correct results.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: IF statement using formula not value

    When I use Jonmo's formula on your data, I get "Doesnt work"?

    A
    B
    C
    D
    E
    1
    Install dated serial_num FAILDATE CHECK
    2
    5/8/2013
    607368173
    5/13/2013
    WORKS WORKS
    3
    8/20/2013
    AC726081601010
    8/21/2013
    WORKS WORKS
    4
    8/20/2011
    AC735073809716
    11/20/2013
    WORKS WORKS
    5
    1/19/2012
    AC735074100497
    12/14/2012
    WORKS WORKS
    6
    8/10/2012
    AC735074101463
    8/10/2012
    WORKS DOESN’T WORK
    7
    9/23/2011
    AC735074101555
    1/25/2013
    WORKS WORKS
    8
    6/20/2012
    AC735074106297
    7/5/2012
    WORKS WORKS
    9
    7/1/2009
    AC735074209081
    5/25/2013
    WORKS WORKS
    10
    7/5/2013
    AC735074209931
    8/7/2013
    WORKS WORKS


    E2=IF(C2>A2, "WORKS", "DOESN’T WORK") copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Glitched formula? IF statement does not work because of a formula in a reference cell
    By Tworksheets in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 02:16 PM
  2. [SOLVED] Formula for Income Statement in financial statement
    By Zunit in forum Excel General
    Replies: 6
    Last Post: 07-02-2012, 02:21 PM
  3. IF statement formula
    By cassandra23 in forum Excel General
    Replies: 1
    Last Post: 12-23-2008, 09:00 PM
  4. Replies: 1
    Last Post: 07-20-2006, 03:05 PM
  5. [SOLVED] Can I use IF statement with a formula?
    By Michael NYC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2005, 12:05 AM

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