+ Reply to Thread
Results 1 to 5 of 5

Nested IF formula partially not working

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Washginton, DC
    MS-Off Ver
    Excel 2007
    Posts
    2

    Nested IF formula partially not working

    Hi,

    New to the forum and am hoping someone can help me.

    Here is my formula:

    =IF(C9="House",INDEX('Detail Generator'!$H:$H,RANDBETWEEN(1,COUNTA('Detail Generator'!$H:$H)),IF(C9="Car",INDEX('Detail Generator'!$I:$I,RANDBETWEEN(1,COUNTA('Detail Generator'!$I:$I)),IF(C9="Holiday",INDEX('Detail Generator'!$J:$J,RANDBETWEEN(1,COUNTA('Detail Generator'!$J:$J)),IF(C9="Hobby",INDEX('Detail Generator'!$K:$K,RANDBETWEEN(1,COUNTA('Detail Generator'!$K:$K)),IF(C9="Emergency",INDEX('Detail Generator'!$L:$L,RANDBETWEEN(1,COUNTA('Detail Generator'!$L:$L)),"NA"))))))))))

    Basically the Cell C9 is its own INDEX return and depending on what that is I want to return another index return. At the moment if C9="House" then it works but any other value I get FALSE.

    Can someone see where I have gone massively wrong?

    Thanks

  2. #2
    Registered User
    Join Date
    11-14-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Nested IF formula partially not working

    Please share the worksheet with data

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Nested IF formula partially not working

    Shifted a few parentheses around..
    Try this
    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    11-14-2012
    Location
    Washginton, DC
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Nested IF formula partially not working

    Was just trying to figure out how to upload data sheets when you replied Ace and you have fixed it! Thank you! You are a Legend!

    Thank you both for you help

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Nested IF formula partially not working

    Thanks!

    Thought your long convoluted multiple IF formula could be refined a bit..

    Try this..

    Please Login or Register  to view this content.

+ 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