Consulting

Results 1 to 6 of 6

Thread: Nested IF formula question

  1. #1
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location

    Nested IF formula question

    I downloaded an invoice book posted by Jonske I think. I have found it useful but want to make a few improvements. It not only prints an invoice, it logs it and keeps a record. On the record sheet which is named "Sales", there is a column-(I) for overdue accounts. I am using a nested if statement in that column which refers to a date in column H.

    What I want the formula to do is...
    leave the cell blank if the account is not overdue...
    Put the word yes in the cell if it is overdue...
    leave the cell blank if the referenced cell (in column H) is blank.

    I have gotten two out of three things accomplished. I just cannot get it to stay blank if there is no data in column H.

    Here is the formula I am trying:
    =IF(H2<=TODAY(),"YES",IF(H2>=TODAY(),"", IF(H2="","","")))
    the workbook is attached in case I wasn't able to make my problem clear. Hoping someone can help me with this.

    ps I changed the action on the print button to printpreview for testing so it will not print the invoice if you click the button, only preview.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Try this

    =IF(OR(H2="",H2>=TODAY()),"","Yes")

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location

    Thanks Jake

    I see how it works now.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  4. #4
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    So Lucas,

    is it solved?
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  5. #5
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Glad to help.

    Take Care

  6. #6
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location

    Thread Solved

    Sorry Carlos, I usually remember to mark them solved
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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