+ Reply to Thread
Results 1 to 6 of 6

Tired of having 259 "IF" functions nested in a single cell

Hybrid View

  1. #1
    Registered User
    Join Date
    02-14-2014
    Location
    FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Tired of having 259 "IF" functions nested in a single cell

    Hello all... I need some help. I have a tracking sheet for company required training that is completely cumbersome to say the least. I have attached a small sheet for ya'll to play with but here is the basic concept.

    The company has 259 employees that I need to track. There are 23 separate classes in the company, not all employees need all classes. Some of the classes are the same length in training hours but most are not. Right now the way the bosses want things set up is a "0" means they have completed the class. A "1" means they need the class and a blank means they don't need it at all.

    Is there a way to set up a formula or logic function for column "D" so that any time I enter a "1" it will equal 2 for adding into the total count at the bottom and for column "E" so that any time I enter a "1" it will equal 16 for adding into the total count at the bottom and so on without having 259 "IF(D2=1,2,0)+IF(D3=1,2,0)……." and "IF(E2=1,16,0)+IF(E3,1,16,0).........." and so on functions in each cell across the bottom row.

    The sheet is working right now but if I need to add a new employee or take out someone or even sort A>Z it just screws things up.

    HELP PLEASE!!!!!!!
    Attached Files Attached Files

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

    Re: Tired of having 259 "IF" functions nested in a single cell

    =SUM(D2:D9)*2 would do it
    "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

  3. #3
    Registered User
    Join Date
    02-14-2014
    Location
    FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Tired of having 259 "IF" functions nested in a single cell

    I also really like the SUMPRODUCT as well. Thank You

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Tired of having 259 "IF" functions nested in a single cell

    Put the class hours in their own row.

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Class1
    Class2
    Class3
    Class4
    Class5
    2
    Last
    First
    Station
    2
    16
    6
    24
    5
    Total
    3
    JONES JIM MCO
    0
    0
    1
    1
    11
    I3: =SUMPRODUCT($D$2:$H$2, D3:H3)
    4
    BOGUS TOM MCO
    1
    1
    1
    13
    5
    NOTREAL BILL MCO
    1
    1
    1
    13
    6
    NOTSURE STEVE MCO
    0
    0
    1
    6
    7
    MADEUP ERIC MCO
    1
    1
    1
    1
    1
    53
    8
    FAKE HANK MCO
    0
    0
    1
    1
    11
    9
    DOE SAM MCO
    1
    1
    0
    1
    23
    10
    SMITH RAY MCO
    0
    0
    0
    0
    0
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    02-14-2014
    Location
    FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Tired of having 259 "IF" functions nested in a single cell

    Thank you. I can't believe that something so simple was staring me in the face but I got so wrapped up trying to fix the sheet from the first person that I never even thought to go with a simple SUM.

    I feel really stupid but THANK YOU!!!!!!

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Tired of having 259 "IF" functions nested in a single cell

    And for the formulas in I2:I9
    =SUMPRODUCT(D2:H2,MID(SUBSTITUTE($D$1:$H$1,"hrs)",""),10,3)+0)

    This would be even easier if you added a row to put the number of hours for the class (without any text in it)
    Say
    D25:H25 = 2 16 6 24 5

    Then it's just
    =SUMPRODUCT(D2:H2,D$25:H$25)

+ 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. Nested "IF" "AND" "OR" Functions
    By Cppaints3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2013, 08:35 PM
  2. [SOLVED] Count "A" and "V" as separate characters in a single cell
    By sportboy712 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2013, 12:26 PM
  3. [SOLVED] Excel 2007 : "AND", "OR" functions nested with "IF"
    By Buscador in forum Excel General
    Replies: 5
    Last Post: 04-11-2012, 09:54 PM
  4. Multiple "nested" functions in a spreadsheet - Solved
    By givea in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2009, 10:10 AM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 PM

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