+ Reply to Thread
Results 1 to 8 of 8

Solution for more Nested IF

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Solution for more Nested IF

    Hi,

    I have work sheet that contain DEMAND in numbers for 36 months in columns corresponding to 40000 PARTS in rows. I have another sheet that have 6000 PARTS. I wants to get latest month that have demand from first sheet corresponding to each PART of 2nd sheet. I am using formula
    =IF(BW3>0,$BW$2,IF(BV3>0,$BV$2,IF(BU3>0,$BU$2)))
    but this can be use upto 8 months only. Please solve my problem so that i will get desired result for 36 months in minimum time.

    Its my first query ...
    Last edited by VKR; 11-19-2011 at 08:48 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,600

    Re: Solution for more Nested IF

    Try =LOOKUP(2, 1/(BW3:CW3>0), BW2:Cw2)
    Hope it will work.

    Adjust your ranges as you need.

  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Solution for more Nested IF

    Quote Originally Posted by zbor View Post
    Try =LOOKUP(2, 1/(BW3:CW3>0), BW2:Cw2)
    Hope it will work.

    Adjust your ranges as you need.
    This is not working.
    I have attached a file for reference. So that you can understand my problem more correctly.
    I wants to get the latest month having demand grater then zero in Last Demand Month (Sheet 2) from Demand (Sheet 1). In attached sheet I have fill first cell by desired result (Feb 2010). This attachment is just an example, original sheet contain very large data.
    Attached Files Attached Files

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,600

    Re: Solution for more Nested IF

    Here, try this:

    =LOOKUP(2, 1/(Demand!B2:AL2<>0), Demand!$B$1:$AL$1)

    and pull down

    If you want to include 0 (in case it's not same as blank like april.10 in first example rather than feb.10)

    then just change 0 to ""

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,600

    Re: Solution for more Nested IF

    Above solution is for any entry (even negative). For just positive values use:

    =LOOKUP(2, 1/(Demand!B2:AL2>0), Demand!$B$1:$AL$1)

  6. #6
    Registered User
    Join Date
    11-18-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Solution for more Nested IF

    Appreciate your efforts..But this formula not providing correct result.Check attachment.
    Attached Files Attached Files

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Solution for more Nested IF

    you arn't using it right see example
    btw a10 is november 11
    or you could use
    =LOOKUP(2, 1/(INDIRECT("demand!"&ADDRESS(MATCH(A2,Demand!$A$1:$A$21,0),2,,1)&":"&ADDRESS(MATCH(A2,Demand!$A$1:$A$21,0),38,,1))>0), Demand!$B$1:$AL$1)
    and put the value you want to check in a2
    Attached Files Attached Files
    Last edited by martindwilson; 11-19-2011 at 08:31 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    11-18-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Solution for more Nested IF

    Quote Originally Posted by martindwilson View Post
    you arn't using it right see example
    btw a10 is november 11
    or you could use

    and put the value you want to check in a2
    ohh my mistake...
    its relay great ...
    thanks boss...excel forum team is doing really amazing job...

+ 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