+ Reply to Thread
Results 1 to 3 of 3

Shortcut for multiple if statements

  1. #1
    Registered User
    Join Date
    05-31-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    88

    Shortcut for multiple if statements

    I'm just wondering if there's a way for me to shorten this formula?

    =IF(D6=$B$5+3,"Bucket 1",IF(A5="Bucket 1","Bucket 2",IF(B5="Bucket 1","",IF(C5="Bucket 3","",IF(A5="Bucket 2","Bucket 3",IF(B5="Bucket 2","",IF(C5="Bucket 2","",IF(A5="Bucket 3",0,""))))))))


    Thanks!!!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Shortcut for multiple if statements

    Look at the Choose Function. If you can have "which bucket" calculate out to be a formula from 1 to 5 you could then have:

    =Choose( Formula, "Bucket", "Bucket 2","Bucket 3","Bucket 4","Bucket 5")

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Shortcut for multiple if statements

    I'm not sure CHOOSE is that applicable in this instance.

    Could you outline the possible values for A5:C5 ?

    Also, is it possible for A5:C5 to contain more than one value at any given time (ie A5:C5 could all read "Bucket 3" simultaneously)

    The above will determine the order of precedence in the IF - as it stands should A5:C5 all hold "Bucket 3" the output of the existing formula would be Null rather than 0
    (ie C5 takes precedence over A5 for this specific value)

+ 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