Sumifs Multiple

billandrew

Well-known Member
Joined
Mar 9, 2014
Messages
743
Good evening all

Trying to sum/combine Column D values.

1. Monday & Tuesday
2.Thursday & Wednesday
3. Friday & Saturday

If Column E = TRUE and Column C = 2 for each unique ID.

attempted formula = =+IF(AND($E2=TRUE,$C2=2),IF(OR($B2="Monday",$B2="Tuesday"),SUMIFS(D$2:D$57,$B$2:$B$57,"Monday",$A$2:$A$57,$A2)+SUMIFS(D$2:D$57,$B$2:$B$57,"Tuesday",$A$2:$A$57,$A2),0))

IDDayCodeValueTRUE FALSE
131Thursday222.4TRUE
131Friday222.0TRUE
131Saturday224.8TRUE
131Wednesday225.6FALSE
131Monday222.9FALSE
131Tuesday223.1FALSE
131Sunday20.0FALSE
132Thursday223.5TRUE
132Friday228.3TRUE
132Saturday230.9TRUE
132Tuesday229.4FALSE
132Wednesday230.2FALSE
132Monday227.9FALSE
132Sunday20.0FALSE
133Thursday236.8TRUE
133Friday234.3TRUE
133Saturday233.1TRUE
133Tuesday237.9FALSE
133Monday241.2FALSE
133Wednesday231.5FALSE
133Sunday20.0FALSE
134Thursday234.9TRUE
134Friday225.7TRUE
134Saturday220.7TRUE
<colgroup><col width="70" style="width: 53pt;"> <col width="100" style="width: 75pt;"> <col width="70" style="width: 53pt;" span="2"> <col width="142" style="width: 107pt;"> <tbody> </tbody>
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,

Try this formula

=SUMIFS(D2:D25,B2:B25,"Monday",C2:C25,2,E2:E25,"True")+SUMIFS(D2:D25,B2:B25,"Tuesday",C2:C25,2,E2:E25,"True")
 
Upvote 0
Try this

=SUM(SUMIFS(D2:D25,B2:B25,{"Monday","Tuesday"},C2:C25,2,E2:E25,"True"))
 
Upvote 0
A
B
C
D
E
F
G
H
I
J
K
1
ID​
Day​
Code​
Value​
TRUE FALSE​
2
131​
Thursday
2​
22.4​
TRUE​
MondayThursdayFriday
3
131​
Friday
2​
22​
TRUE​
TuesdayWednesdaySaturday
4
131​
Saturday
2​
24.8​
TRUE​
131​
0​
22.4​
46.8​
5
131​
Wednesday
2​
25.6​
FALSE​
132​
23.5​
0​
59.2​
6
131​
Monday
2​
22.9​
FALSE​
133​
0​
36.8​
67.4​
7
131​
Tuesday
2​
23.1​
FALSE​
134​
0​
34.9​
46.4​
8
131​
Sunday
2​
0​
FALSE​
9
132​
Tuesday
2​
23.5​
TRUE​
10
132​
Friday
2​
28.3​
TRUE​
11
132​
Saturday
2​
30.9​
TRUE​
12
132​
Tuesday
2​
29.4​
FALSE​
13
132​
Wednesday
2​
30.2​
FALSE​
14
132​
Monday
2​
27.9​
FALSE​
15
132​
Sunday
2​
0​
FALSE​
16
133​
Thursday
2​
36.8​
TRUE​
17
133​
Friday
2​
34.3​
TRUE​
18
133​
Saturday
2​
33.1​
TRUE​
19
133​
Tuesday
2​
37.9​
FALSE​
20
133​
Monday
2​
41.2​
FALSE​
21
133​
Wednesday
2​
31.5​
FALSE​
22
133​
Sunday
2​
0​
FALSE​
23
134​
Thursday
2​
34.9​
TRUE​
24
134​
Friday
2​
25.7​
TRUE​
25
134​
Saturday
2​
20.7​
TRUE​

<tbody>
</tbody>


I4=SUMPRODUCT(SUMIFS($D$2:$D$25,$A$2:$A$25,$H4,$B$2:$B$25,I$2:I$3,$E$2:$E$25,$E$2,$C$2:$C$25,$C$2)) copy down and across

 
Upvote 0
A better explanation.


if Column E is TRUE, Column C is equal to 2. sum both values of the same ID TRUE AND FALSE.

In the table above I need to sum the value of ID 132 and place the result adjacent to the cell where there is a TRUE value in column E.

below is a smaller subset of the explanation. The result would be 52.86 the sum of values for ID 132.

The formula I am using above does work, however I would have to separate the Monday + Tuesday Wednesday + Thursday & Friday + Saturday data and then combine. Looking to perform with one function.


132Monday223.5TRUE
132Friday228.3TRUE
132Saturday230.9TRUE
132Tuesday229.4FALSE
132Wednesday230.2FALSE

<tbody>
</tbody><colgroup><col><col><col span="2"><col></colgroup>
 
Upvote 0
Original Post may not provide the most accurate explanation. The subsequent post (Post 6) provides a better example of what I am attempting to accomplish.
 
Upvote 0
What value do you need adjacent to FALSE?

the below formula will result as "No Value needed" against all the False.

=IF(E2=False,"No Value needed",SUM(SUMIFS(D$2:D$25,B$2:B$25,{"Monday","Tuesday"},C$2:C$25,2)))
 
Upvote 0

Forum statistics

Threads
1,214,374
Messages
6,119,152
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top