+ Reply to Thread
Results 1 to 7 of 7

Summing numbers based on multiple conditions across a range

  1. #1
    Registered User
    Join Date
    11-20-2018
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2013
    Posts
    3

    Question Summing numbers based on multiple conditions across a range

    I'm an Army instructor and I'm trying to build a spreadsheet that will track which instructor taught which lecture, how many questions were asked about this lecture on the four written tests, and how many of those questions were missed by a high percentage of students. I've attached screenshots of my preliminary work.
    rollup.jpg
    matrix.jpg
    I have used the SUMIF formula shown to figure out the number of questions based on the lectures that were taught, but sometimes the instructors move to different classrooms and teach, so I need to figure out how that will work across the range shown in the second screenshot. For example, Jackson teaches a lecture in team 5, how would I word the formula that it will count that lecture and add the questions? I've tried putting the whole range of cells in the formula, but it returns #VALUE.
    The other issue I have is dealing with the test versions, which have differing numbers of questions for different lectures. How do I write the formula where I can put version A,B, or C in the appropriate cells on the first screenshot and it will do the appropriate sum for the number of questions? I've tried doing a IF with nested SUMIF formulas, but it also returns #VALUE.

    Any help would be appreciated.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: Summing numbers based on multiple conditions across a range

    Hi docstew. Welcome to the forum.

    You almost always get faster/more responses and faster solution if you upload a small Excel workbook file (instead of a screenshot). Make sure it is representative of what you are working with. It saves volunteers from regenerating the data and gives context to the questions.

    The 'paperclip' icon does not work for this. Use this method instead.

    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),

    be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    11-20-2018
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Summing numbers based on multiple conditions across a range

    Thanks for your reply. I did what you said as far as attaching the actual spreadsheet. Please see attached.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: Summing numbers based on multiple conditions across a range

    I am having difficulty understanding. So I need to take this in steps.

    For starters I would suggest some helper rows and a helper column in 'IOC Rollup'.

    In order to make the column headers consistent with headers in 'TIA Matrix' insert two rows above the current column headers. Then parse those with these formulas. In C2:K2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and C3:K3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The offset section headers in column A 'IOC Rollup' cause havoc for formulas similar to merged cells. The helper in column O is a remedy for this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I need to examine the details in both sheets to determine what my other questions are. At the moment I have difficulty relating some of the items across both sheets.

    Try this much and see if it helps so far.


    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    2
    LPC
    LPC
    FC1
    FC1
    FC2
    FC2
    FC3
    FC3
    3
    Questions
    High Missed
    Questions
    High Missed
    Questions
    High Missed
    Questions
    High Missed
    4
    Lectures
    LPC Questions
    LPC High Missed
    FC1 Questions
    FC1 High Missed
    FC2 Questions
    FC2 High Missed
    FC3 Questions
    FC3 High Missed
    Total Questions
    Total High missed
    Percentage
    Helper
    Test Version taken
    5
    Team 1
    SFC S
    8
    16
    1
    17
    15
    15
    63
    1
    2%
    Team 1
    LPC
    B
    6
    SSG D
    3
    9
    0
    3
    0
    0
    12
    0
    0%
    Team 1
    FC1
    B
    7
    SSG F
    7
    10
    0
    10
    17
    5
    42
    0
    0%
    Team 1
    FC2
    A
    8
    SSG J
    7
    8
    0
    5
    5
    21
    39
    0
    0%
    Team 1
    FC3
    C
    9
    SSG R
    7
    7
    0
    15
    13
    9
    44
    0
    0%
    Team 1
    10
    Team 2
    SFC R
    0
    0
    0
    0
    0
    0
    0
    0
    Team 2
    11
    SSG Ch
    0
    0
    0
    0
    0
    0
    0
    Team 2
    12
    SSG Cu
    0
    0
    0
    0
    0
    0
    0
    Team 2
    13
    SSG G
    0
    0
    0
    0
    0
    0
    0
    Team 2
    14
    SSG N
    0
    0
    0
    0
    0
    0
    0
    Team 2
    15
    Team 3
    SSG W
    0
    0
    0
    0
    0
    0
    0
    Team 3
    16
    SSG So
    0
    0
    0
    0
    0
    0
    0
    Team 3
    17
    SSG Su
    0
    0
    0
    0
    0
    0
    0
    Team 3
    18
    SSG T
    0
    0
    0
    0
    0
    0
    0
    Team 3
    19
    SSG V
    0
    0
    0
    0
    0
    0
    0
    Team 3

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,742

    Re: Summing numbers based on multiple conditions across a range

    There are inconsistencies in the two sheets. 'TIA Matrix' makes a distinction between LPC-A, LPC-B and LPC-C. 'IOC Rollup' does not. It appears you wish to sum only LPC-A. What is the roll of the other LPCs?

    Edit Also it appears the formula in column E 'IOC Rollup' "LPC High Missed" references the column "High Missed" for Team 1 in 'TIA Matrix'.

    The assignment is becoming less clear the more I look at this.
    I am most confused.

    Can you help us out?
    Last edited by FlameRetired; 11-26-2018 at 04:07 PM.

  6. #6
    Registered User
    Join Date
    11-20-2018
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Summing numbers based on multiple conditions across a range

    I was planning to have the numbers of questions add up depending on the version of the test given: A, B, or C. That's actually one of the issues I was having, getting the number of questions to add up based on the test version. That's the reason for the discrepancy in the two sheets, it was done as a placeholder. I've actually solved that issue with a helper sheet and IF formula.

    The missing formulas are simply because I haven't put them in yet, trying to get them to work before I go largescale with it.

    Main issue is still getting the count for each instructor's lectures and how many questions they have on the test if they move between classrooms. I attached an updated one after making some of those changes. It's almost working the way I want, just has weird values popping in where I didn't want them.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,003

    Re: Summing numbers based on multiple conditions across a range

    If I understand correctly then the following may work in summing the number of questions per version of each test.
    Helper columns are added to the Version Breakdown sheet.
    Column D is populated using: =IF(ISTEXT(A2),LEFT(A2,3),D1)
    Columns E:G are populated using: =IF(ISNUMBER(A3),A3,"")
    On the IOC Rollup sheet, R3:R6 are populated using*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Denotes and array entered formula which is confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula.
    As to the "...count for each instructor's lectures and how many questions they have on the test if they move between classrooms..." we may be better able to help if you would give an example or two of which numbers on the IOC Rollup sheet are "weird" and what the expected value should be (and perhaps why the value is expected)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] User Defined Function for Summing a range based on multiple conditions
    By judeprem in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2020, 03:39 AM
  2. [SOLVED] Summing values in cells based on multiple conditions
    By OregonSenior in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-28-2014, 06:58 PM
  3. Replies: 3
    Last Post: 07-11-2012, 06:36 PM
  4. Summing multiple sheet range based on column and offset row lookup
    By SKAh in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-08-2011, 04:52 PM
  5. Summing based on multiple conditions
    By confu5ion in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-11-2010, 06:14 PM
  6. Summing a range with conditions
    By rb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-26-2006, 07:15 PM
  7. [SOLVED] RE: Summing a range with conditions
    By bpeltzer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2006, 06:50 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