+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : trouble adding an additional IF function

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    boston
    MS-Off Ver
    Excel 2007
    Posts
    1

    trouble adding an additional IF function

    I have the following formula that works:
    =IF($C2=" ","",IF($D2=0,$V$5,IF(VLOOKUP($U2,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)<$D2,$V$3,IF(AND(VLOOKUP($U2,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)>=$D2,VLOOKUP($U2,'Stock on Posting Date'!$A$1:$J$600,7,FALSE)>VLOOKUP($U2,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)),$V$8,$V$5))))

    When I add an additional if statement at the beginning it stops calculating after the first if function.
    here is the formula:
    =IF(VLOOKUP($C3,'Planner Known Issues_CFLi'!A2:J36,1,FALSE)=$C3,CFLi!$V$2,IF($C3=" ","",IF($D3=0,$V$5,IF(VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)<$D3,$V$3,IF(AND(VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)>=$D3,VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,7,FALSE)>VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)),$V$8,$V$5)))))

    In bold is the only part of the formula that calculates. Any ideas on why this is happening?

    I also need a final function that returns "x" if #N/A

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: trouble adding an additional IF function

    Hello TEdward00,

    What are you trying to do with that extra part? In

    =VLOOKUP($C3,'Planner Known Issues_CFLi'!A2:J36,1,FALSE)

    You are looking up C3 in column A and returning the value from the same column.....so the result of that formula can only be C3 or #N/A so your long formula can only return CFLi!$V$2 or #N/A error......if that's really what you want to do then try using COUNTIF instead......that won't return an error so the rest of the formula can work, i.e.

    =IF(COUNTIF('Planner Known Issues_CFLi'!A2:A36,$C3),CFLi!$V$2,IF($C3=" ","",IF($D3=0,$V$5,IF(VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)<$D3,$V$3,IF(AND(VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)>=$D3,VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,7,FALSE)>VLOOKUP($U3,'Stock on Posting Date'!$A$1:$J$600,9,FALSE)),$V$8,$V$5)))))
    Audere est facere

+ 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