Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sum based upon matching data in different columns
In the example below I need to sum the counts of 2 or more groups based upon
a match of start times in column B and return that sum to column F. Below the example, I have a formula that compares the start times in Column B to Column E and returns a single value. My problem is I don't know how to sum all the counts of Column C if the start times match. If you can help I would appreciate it! Many thanks! Data Column A Column B Column C Group Time Count 7750 6:00am 21 7750 6:15am 35 7750 6:30am 12 7750 7:00am 0 7757 6:00am 15 7757 6:30am 20 7757 7:00am 9 7758 6:15am 10 Desired Result: Column E Column F Time Count 6:00am 36 (sum of group 7750 & 7757 since they both have 6:00am start times 6:15am 45 (sum of groups 7750, 7757, & 7758) 6:30am 32 6:45am (blank due to no time match) 7:00am 9 =IF(ISERROR(MATCH(A2,$K$3:$K$27,0)),"",INDEX($L$3: $L$27,MATCH(A2,$K$3:$K$27,0))) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sum based upon matching data in different columns
Try this...
Assuming your times are true Excel times... E2:E6 = 6:00 AM, 6:15 AM, 6:30 AM, 6:45 AM, 7:00 AM Enter this formula in F2 and copy down as needed: =SUMIF(B$2:B$9,E2,C$2:C$9) -- Biff Microsoft Excel MVP "Stan" wrote in message ... In the example below I need to sum the counts of 2 or more groups based upon a match of start times in column B and return that sum to column F. Below the example, I have a formula that compares the start times in Column B to Column E and returns a single value. My problem is I don't know how to sum all the counts of Column C if the start times match. If you can help I would appreciate it! Many thanks! Data Column A Column B Column C Group Time Count 7750 6:00am 21 7750 6:15am 35 7750 6:30am 12 7750 7:00am 0 7757 6:00am 15 7757 6:30am 20 7757 7:00am 9 7758 6:15am 10 Desired Result: Column E Column F Time Count 6:00am 36 (sum of group 7750 & 7757 since they both have 6:00am start times 6:15am 45 (sum of groups 7750, 7757, & 7758) 6:30am 32 6:45am (blank due to no time match) 7:00am 9 =IF(ISERROR(MATCH(A2,$K$3:$K$27,0)),"",INDEX($L$3: $L$27,MATCH(A2,$K$3:$K$27,0))) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Matching two columns and their data | Excel Worksheet Functions | |||
Matching Data in Columns | Excel Worksheet Functions | |||
Matching data from 2 columns | Excel Worksheet Functions | |||
MATCHING DATA IN COLUMNS | Excel Worksheet Functions | |||
Matching data in columns | Excel Discussion (Misc queries) |