+ Reply to Thread
Results 1 to 2 of 2

Nesting 'And' 'or' within an If

  1. #1
    Registered User
    Join Date
    12-02-2011
    Location
    Worcester
    MS-Off Ver
    Excel 2007
    Posts
    6

    Nesting 'And' 'or' within an If

    Good Afternoon,

    On the attached sheet in column X, I am trying to input the Allocation percentage dependent on a number of variables:

    Type (Bar, Blank, Coil, Sheet, Special)
    Sub Fam Code (2A02, BC02-05, BC99, BZ99)
    Sup Category (Arcelor, Independent, Tata/ Corus)

    The allocation percentage is based on the below; anything outside of this should result in "Other".
    Sheet (BC02/03/04) A=40%, T=40% & I=20%
    Coil (BC02 & BC03) A=40%, T=40% & I=20%
    Coil (BC04) A=30%, T=50% & I=20%

    Example 1:
    Type - Sheet & Coil
    Sup Category - Independent
    Result 20%

    Example 2:
    Type - Coil
    Sup Category - Tata/ Corus
    Sub Fam Code - BC04
    Result 50%

    Example 3:
    Type - Coil
    Sup Category - Arcelor
    Sub Fam Code - BC04
    Result 30%

    I hope I have made it clear as to what I intend to change.
    Attached Files Attached Files

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Nesting 'And' 'or' within an If

    I think trying to nest all that decision-making into IF statements is too complicted. Changing the parameters will mean re-working the logic every single time, it would just be a mess.

    I advise pumping through lookup tables using INDEX(MATCH) combos. That way the formulas can stay relatively stable, all you need to do is update the range-size references maybe (not even that if you go to named ranges, you'll just have to update the name refernce), and it will be much clearer what combos are supposed to output what percentage just looking at it, so you will have an easier time trouble-shooting.

    See column R in attached for the lookup and the new sheet "tables" for the tables.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Too much nesting
    By moontraveler1984 in forum Excel General
    Replies: 10
    Last Post: 11-29-2011, 12:33 PM
  2. If/Then Nesting AND/OR
    By artiststevens in forum Excel General
    Replies: 2
    Last Post: 01-01-2011, 05:56 PM
  3. Nesting more than 7 ifs...another way?
    By Blade2304 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-04-2007, 11:17 AM
  4. IF - Nesting... almost got it - need a bit of help
    By Bill Kuunders in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 05:05 PM
  5. IF - Nesting... almost got it - need a bit of help
    By AngelaG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2005, 06:05 PM

Tags for this Thread

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