+ Reply to Thread
Results 1 to 6 of 6

Long Nested IFs

  1. #1
    Registered User
    Join Date
    02-12-2011
    Location
    California
    MS-Off Ver
    Excel 2003 & 7
    Posts
    5

    Question Long Nested IFs

    Hi Excel Wizzards !

    I have this long nested IF that I was wondering.. does it need to be so darn long, or can it somehow be trimmed down with smarter formula?

    =IF(RIGHT(F19,1)="B","HI RACK "&C19,IF(RIGHT(F19,1)="C","HI RACK "&C19,IF(RIGHT(F19,1)="D","HI RACK "&C19,IF(RIGHT(F19,1)="E","HI RACK "&C19,IF(RIGHT(F19,1)="F","HI RACK "&C19,"FLOOR "&C19)))))

    I was thinking something like this would be nice:

    =IF(RIGHT(F19,1)={"B","C","D","E","F"},"HI RACK "&C19,"FLOOR "&C19)

    F19 is a position in a Pallet Rack. A is 'floor' level, B,C,D,E,F are overhead (hi rack) levels. C19 is the company code that owns the products.
    Last edited by disturbed; 02-12-2011 at 05:42 AM. Reason: solved

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,935

    Re: Long Nested IF's, Can It Be Trimmed Down?

    It seems like everything is "HI RACK" unless its on the floor:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-12-2011 at 02:50 AM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-12-2011
    Location
    California
    MS-Off Ver
    Excel 2003 & 7
    Posts
    5

    Re: Long Nested IF's, Can It Be Trimmed Down?

    Quote Originally Posted by protonLeah View Post
    It seems like everything is "HI RACK" unless its on the floor:
    Damn.. you could almost end that with "DUH" !! Now that the light's shining in, I can't recall why I did all that "hi rack" stuff.. hmmm.

    Anyway.. THANKS for pointing that out

  4. #4
    Registered User
    Join Date
    02-12-2011
    Location
    California
    MS-Off Ver
    Excel 2003 & 7
    Posts
    5

    Re: Long Nested IF's, Can It Be Trimmed Down?

    Just recalled why all the "hi racks".. there's other strings that make up floor as well.. mostly alpha/numeric but the problem is that A is not the only floor, and B,C,D,E,F are the only hi racks.

    Is there no way to use if (A,B,C,D,E) as an OR statement?

    I would like to write something like =IF(OR( if that makes sense.

    < 10 minutes later >

    I'm trying to get this to work now, I get a #VALUE! error:
    =IF(RIGHT(F19,1)=OR("B","C","D","E","F"),"HI RACK "&C19,"FLOOR "&C19)

    Am I asking for something that can't be done?
    Last edited by disturbed; 02-12-2011 at 03:27 AM. Reason: tested formula

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

    Re: Long Nested IF's, Can It Be Trimmed Down?

    Very close - need to place the OR in the correct position:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-12-2011
    Location
    California
    MS-Off Ver
    Excel 2003 & 7
    Posts
    5

    Thumbs up Re: Long Nested IF's, Can It Be Trimmed Down?

    Quote Originally Posted by DonkeyOte View Post
    Very close - need to place the OR in the correct position:
    Hooray!! That's exactly what I'm looking for.

    Thanks very much!!

+ 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