+ Reply to Thread
Results 1 to 8 of 8

If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    Having some trouble with a formula.

    The formula is below:

    =IF(C10<E9,DATE(YEAR(D9),MONTH(D9)+1,DAY(D9)),IF(AND(E9<=$H$9,E9>$H$7),DATE(YEAR(D9),MONTH(D9)+1,DAY(D9)),"Unable To Roll"))

    I also want to incorporate the logic, if C10="","". I just can't seem to figure this out.

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

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    Do you mean?

    Please Login or Register  to view this content.
    which can probably be rewritten as:

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

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

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

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    Worked perfectly. Thanks for the help!!


  4. #4
    Registered User
    Join Date
    04-24-2012
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    I was mistaken. It will no longer recognize IF(OR(C10<E9,AND(E9<=$H$9,E9>$H$7)),DATE(YEAR(D9),MONTH(D9)+1,DAY(D9)),"Unable To Roll")). Regardless of what I input into Cell C10, it will continue to add 1 month.

    To break it down, I need the formula to do quite a few things:

    1.) If C10 is blank, give me a blank value in return
    2.) If C10 is less than E9 then add 1 month
    3.) If E9 is <= H9 and E9 is > H7 then add 1 month

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    The formula works fine for me.

    Do you have Automatic calculations off by any chance?

    Go to Tools|Options and in Calculation tab, check Automatic calculations on.

  6. #6
    Registered User
    Join Date
    04-24-2012
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    I think it may be the way I'm explaining it then. I'm attaching the file to see if it helps. It will work if E9 > H7, however if H7 is blank and C10 is > E9, it will still add a month to the calculation.
    Attached Files Attached Files

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    So will this work?

    =IF(C10="","",IF(OR(C10<E9,AND(E9<=H9,E9>H7,H7>0,H9>0)),DATE(YEAR(D9),MONTH(D9)+1,DAY(D9)),"Unable To Roll"))

  8. #8
    Registered User
    Join Date
    04-24-2012
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: If Cell1 < Cell2 then add 1 month or if Cell1 = blank then blank

    It does, thank you so much for the help! 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.6.0 RC 1