nparsons75
Well-known Member
- Joined
- Sep 23, 2013
- Messages
- 1,254
- Office Version
- 2016
Hi,
I have a table of data with a 3 cells that calculate the sum of a column (C) depending on the value in the adjacent column (B). So, SUM all values that contain the correct criteria. I have 3 criteria options, r,a,g. Basically red amber green. The formula works fine and shows what I need. However, the next step which I need to work I cannot get to grips with. I would like to filter using the standard table dropdown and select a customer. The result would then show me the SUM only for that specific customer. To do this I think! I need to somehow combine SUMIF and SUBTOTAL. Please see the table below, hopefully this helps to explain. Appreciate any help...
I have a table of data with a 3 cells that calculate the sum of a column (C) depending on the value in the adjacent column (B). So, SUM all values that contain the correct criteria. I have 3 criteria options, r,a,g. Basically red amber green. The formula works fine and shows what I need. However, the next step which I need to work I cannot get to grips with. I would like to filter using the standard table dropdown and select a customer. The result would then show me the SUM only for that specific customer. To do this I think! I need to somehow combine SUMIF and SUBTOTAL. Please see the table below, hopefully this helps to explain. Appreciate any help...
Book1 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
3 | Sum | Sum | Sum | |||||||
4 | 670025 | 601219 | 424498 | 1695742 | ||||||
5 | 1695742 | |||||||||
6 | Customer | Risk | Value | |||||||
7 | David | r | 319844 | |||||||
8 | David | r | 164511 | |||||||
9 | David | g | 251458 | |||||||
10 | David | g | 52320 | |||||||
11 | Mark | a | 104860 | |||||||
12 | Mark | a | 174600 | |||||||
13 | Mark | r | 97800 | |||||||
14 | Mark | a | 119000 | |||||||
15 | Mark | a | 99504 | |||||||
16 | Steven | g | 28320 | |||||||
17 | Steven | g | 92400 | |||||||
18 | Charlie | a | 102000 | |||||||
19 | Charlie | a | 1255 | |||||||
20 | Charlie | r | 75865 | |||||||
21 | Charlie | r | 12005 | |||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E4 | E4 | =SUMIFS(C7:C21,B7:B21,"r") |
F4 | F4 | =SUMIFS(C7:C21,B7:B21,"a") |
G4 | G4 | =SUMIFS(C7:C21,B7:B21,"g") |
H4 | H4 | =SUM(E4:G4) |
C5 | C5 | =SUM(C7:C21) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
B7:B21 | Cell Value | ="g" | text | NO |
B7:B21 | Cell Value | ="a" | text | NO |
B7:B21 | Cell Value | ="r" | text | NO |