+ Reply to Thread
Results 1 to 5 of 5

Thread: Using a forumla within an IF Function?

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Using a forumla within an IF Function?

    Hello,

    Is it possible to have the a forumla work as the true answer in an IF function.

    i.e. if the column has full days, then use forumla - I have the below but it does not use the formula, it just types it in.

    Am trying to total that if cell has full day, then calculate 3 days after of the date in column U2 whcih works if i just put in the formula but if used with the IF function, it does not calculate.

    =IF(Y2="full day","=DATE(YEAR(U2),MONTH(U2),DAY(U2)+3)")

    Any ideas?

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,616

    Re: Using a forumla within an IF Function?

    How about?

    =IF(Y2="full day",U2+3,U2)

    or

    =U2+IF(Y2="full day",3,0)

    you may have to format the cell as Date if you are getting a 5 digit number result....
    Last edited by NBVC; 01-26-2012 at 11:08 AM.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-26-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using a forumla within an IF Function?

    Thanks very much NBVC.

    One more question, if the answer is false, what do i add so that the cell stays blank? as when i drag this, it puts in the date.

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,616

    Re: Using a forumla within an IF Function?

    Try:

    =IF(Y2="full day",U2+3,"")
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    01-26-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using a forumla within an IF Function?

    Thanks very much, you just saved me a lot of time. Very much appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0