+ Reply to Thread
Results 1 to 6 of 6

#VALUE with Nexted IF/AND Statements

Hybrid View

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    Ohio
    MS-Off Ver
    Microsoft 365
    Posts
    76

    #VALUE with Nexted IF/AND Statements

    E4 - begin date
    F4 - # of weeks
    G4 - # of weeks x 7 (will be a hidden column)
    H4 - end date - formulated cell: =IF((E4>0),SUM(E4+G4)-1," ")
    I4 - this cell I want to populate with "Notify PT" when certain conditions apply.

    This is the formula I have in I4:
    =IF(AND(F4<>"",$F$1=H4-10,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-9,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-8,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-7,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-6,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-5,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-4,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-3,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-2,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-1,F5=0),"Notify PT"," "))))))))))

    It works fine when I enter dates and numbers into E4 and F4, but when they're blank, I keep getting #VALUE.

    It's probably something really simple but I've played around with it and I can't get #VALUE to go away.

    Thank you so much for your help with this!!

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: #VALUE with Nexted IF/AND Statements

    Without trying to follow the formula's logic, the simple fix would be:

    =IF(COUNT(E4:F4)=2,your current formula,"")

    Actually, after a closer look, I don't see any reference to E4 in the formula. That being the case then just this would suffice:


    =IF(F4="","",your current formula) don't forget the extra ) at the end
    Last edited by Cutter; 06-20-2012 at 10:26 AM.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: #VALUE with Nexted IF/AND Statements

    Hi

    Did you try ISERROR?

    =ISERROR(IF(AND(F4<>"",$F$1=H4-10,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-9,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-8,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-7,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-6,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-5,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-4,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-3,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-2,F5=0),"Notify PT",IF(AND(F4<>"",$F$1=H4-1,F5=0),"Notify PT"," "))))))))));"")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    06-14-2012
    Location
    Ohio
    MS-Off Ver
    Microsoft 365
    Posts
    76

    Re: #VALUE with Nexted IF/AND Statements

    @Cutter - That worked! Thank you so much!

    @Fotis1991 - I copied and pasted the formula you put but it said the formula contained an error.

    Thank you guys so much for your help with this!!!!

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: #VALUE with Nexted IF/AND Statements

    You're welcome. Don't forget to mark your thread as SOLVED (click Forum Rules @ top of page to see instructions in rule #9).

  6. #6
    Registered User
    Join Date
    06-14-2012
    Location
    Ohio
    MS-Off Ver
    Microsoft 365
    Posts
    76

    Re: #VALUE with Nexted IF/AND Statements

    Thanks! I'm new to this so I forgot. Thanks for all your help!

+ 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