Sum((CountIF, with Mult. Ranges across Mult. Tabs, 1 Criteria) + (CountIF, with Mult. Ranges across Mult. Tabs, 1 Criteria))

AudyAnalyst

New Member
Joined
Nov 24, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to attempt to put into one table both the age group the pet is in and the groups they scored into. I'm struggling with getting the two different tabs to calculate one number and the age being ">=" and "<=". Excel keeps saying I have too many arguments.

Any Help Would Be great!

Example Date- Simple Master.xlsx
ABCDEFGHIJK
1AgeGlobalDEUSScoreDEUS
2Less than 1 Year918.00No Need16
31 Year133.0010.00111
42 Years21.001.001.511
53 Years20.002.00201
64 Years21.001.002.511
75 Years41.003.00323
86 Years32.001.003.534
97 Years124.008.004110
108 Years00.000.004.511
119 Years00.000.00526
12Total47.0013.0034.00Total1334
13
14
15AgeNo Need11.522.533.544.55
16Less than 1 Year
171 Year
182 Years
193 Years
204 Years
215 Years
226 Years
237 Years
248 Years
259 Years
LOS
Cell Formulas
RangeFormula
B2:B11B2=SUM(C2:D2)
C2C2=COUNTIF(DE!$D:$D,"<=0.99")
D2D2=COUNTIF(US!$C:$C,"<=0.99")
C3C3=COUNTIFS(DE!$D:$D,">=1.0",DE!$D:$D,"<=1.99")
D3D3=COUNTIFS(US!$C:$C,">=1.0",US!$C:$C,"<=1.99")
C4C4=COUNTIFS(DE!$D:$D,">=2.0",DE!$D:$D,"<=2.99")
D4D4=COUNTIFS(US!$C:$C,">=2.0",US!$C:$C,"<=2.99")
C5C5=COUNTIFS(DE!$D:$D,">=3.0",DE!$D:$D,"<=3.99")
D5D5=COUNTIFS(US!$C:$C,">=3.0",US!$C:$C,"<=3.99")
C6C6=COUNTIFS(DE!$D:$D,">=4.0",DE!$D:$D,"<=4.99")
D6D6=COUNTIFS(US!$C:$C,">=4.0",US!$C:$C,"<=4.99")
C7C7=COUNTIFS(DE!$D:$D,">=5.0",DE!$D:$D,"<=5.99")
D7D7=COUNTIFS(US!$C:$C,">=5.0",US!$C:$C,"<=5.99")
C8C8=COUNTIFS(DE!$D:$D,">=6.0",DE!$D:$D,"<=6.99")
D8D8=COUNTIFS(US!$C:$C,">=6.0",US!$C:$C,"<=6.99")
C9C9=COUNTIFS(DE!$D:$D,">=7.0",DE!$D:$D,"<=7.99")
D9D9=COUNTIFS(US!$C:$C,">=7.0",US!$C:$C,"<=7.99")
C10C10=COUNTIFS(DE!$D:$D,">=8.0",DE!$D:$D,"<=8.99")
D10D10=COUNTIFS(US!$C:$C,">=8.0",US!$C:$C,"<=8.99")
C11C11=COUNTIFS(DE!$D:$D,">=9.0",DE!$D:$D,"<=9.99")
D11D11=COUNTIFS(US!$C:$C,">=9.0",US!$C:$C,"<=9.99")
B12B12=SUBTOTAL(109,[Global])
C12,I12C12=SUBTOTAL(109,[DE])
D12,J12D12=SUBTOTAL(109,[US])
I2:I11I2=COUNTIF(DE!$F:$F,H2)
J2:J11J2=COUNTIF(US!$E:$E,H2)


Example Date- Simple Master.xlsx
ABCDE
1Pet NameBirthday AgeEvent DateScore
2Button3/1/20220.003/1/2022No Need
3Bear7/13/20201.633/1/20225.00
4Bullet7/1/20201.673/1/20222.50
5Max 6/1/20201.753/1/20223.00
6Charlie 2/1/20202.083/1/20223.50
7Cooper 4/1/20174.923/1/20225.00
8Buddy 3/1/20175.003/1/20221.00
9Rocky 7/1/20156.673/1/20221.50
10Milo 5/5/20156.823/1/20224.50
11Jack 1/12/20157.143/1/20223.00
12 Luna.1/1/20157.173/1/20224.00
13 Lucy.12/1/20147.253/1/20223.50
14Rocket11/1/20147.333/1/20223.50
DE


Example Date- Simple Master.xlsx
ABCDE
1Pet NameBirthday AgeEvent DateScore
2Harvey2/21/20220.033/1/2022No Need
3Sasha2/14/20220.053/1/2022No Need
4Cookie1/24/20220.103/1/2022No Need
5Scout1/24/20220.103/1/2022No Need
6Dexter12/6/20210.243/1/20221.50
7Bruno11/29/20210.263/1/2022No Need
8Zoe11/29/20210.263/1/2022No Need
9Louis7/6/20210.653/1/20222.00
10Billie1/4/20211.163/1/20222.50
11Lexi12/14/20201.213/1/20225.00
12Charlie12/14/20201.213/1/20224.50
13Koda11/30/20201.253/1/20224.00
14Pippa10/31/20201.343/1/20223.00
15Duke9/21/20201.443/1/20225.00
16Bruce8/24/20201.523/1/20224.00
17Oreo5/26/20201.763/1/20225.00
18Rusty5/18/20201.793/1/20224.00
19Baxter5/4/20201.833/1/20224.00
20Gus7/29/20192.593/1/20223.00
21Milly9/17/20183.463/1/20223.50
22Ellie5/29/20183.763/1/20224.00
23Jessie8/1/20174.583/1/20224.00
24Stella11/21/20165.283/1/20225.00
25Diesel4/11/20165.893/1/20221.00
26Cleo3/28/20165.933/1/20223.50
27Evie7/27/20156.593/1/20223.50
28Winnie11/17/20147.293/1/20223.50
29 Bella.10/1/20147.423/1/20224.00
30 Luna.9/3/20147.493/1/20224.00
31 Lucy.9/2/20147.503/1/20225.00
32 Daisy.8/25/20147.523/1/20224.00
33 Lily.8/18/20147.543/1/20224.00
34 Zoe.8/4/20147.583/1/20223.00
35 Lola.6/23/20147.693/1/20225.00
US



Here is the Data raw if that is helpful:

Pet NameBirthdayAgeEvent DateScore
Harvey​
2/21/2022​
0.03​
3/1/2022​
No Need​
Sasha​
2/14/2022​
0.05​
3/1/2022​
No Need​
Cookie​
1/24/2022​
0.10​
3/1/2022​
No Need​
Scout​
1/24/2022​
0.10​
3/1/2022​
No Need​
Dexter​
12/6/2021​
0.24​
3/1/2022​
1.50​
Bruno​
11/29/2021​
0.26​
3/1/2022​
No Need​
Zoe​
11/29/2021​
0.26​
3/1/2022​
No Need​
Louis​
7/6/2021​
0.65​
3/1/2022​
2.00​
Billie​
1/4/2021​
1.16​
3/1/2022​
2.50​
Lexi​
12/14/2020​
1.21​
3/1/2022​
5.00​
Charlie​
12/14/2020​
1.21​
3/1/2022​
4.50​
Koda​
11/30/2020​
1.25​
3/1/2022​
4.00​
Pippa​
10/31/2020​
1.34​
3/1/2022​
3.00​
Duke​
9/21/2020​
1.44​
3/1/2022​
5.00​
Bruce​
8/24/2020​
1.52​
3/1/2022​
4.00​
Oreo​
5/26/2020​
1.76​
3/1/2022​
5.00​
Rusty​
5/18/2020​
1.79​
3/1/2022​
4.00​
Baxter​
5/4/2020​
1.83​
3/1/2022​
4.00​
Gus​
7/29/2019​
2.59​
3/1/2022​
3.00​
Milly​
9/17/2018​
3.46​
3/1/2022​
3.50​
Ellie​
5/29/2018​
3.76​
3/1/2022​
4.00​
Jessie​
8/1/2017​
4.58​
3/1/2022​
4.00​
Stella​
11/21/2016​
5.28​
3/1/2022​
5.00​
Diesel​
4/11/2016​
5.89​
3/1/2022​
1.00​
Cleo​
3/28/2016​
5.93​
3/1/2022​
3.50​
Evie​
7/27/2015​
6.59​
3/1/2022​
3.50​
Winnie​
11/17/2014​
7.29​
3/1/2022​
3.50​
Bella.​
10/1/2014​
7.42​
3/1/2022​
4.00​
Luna.​
9/3/2014​
7.49​
3/1/2022​
4.00​
Lucy.​
9/2/2014​
7.50​
3/1/2022​
5.00​
Daisy.​
8/25/2014​
7.52​
3/1/2022​
4.00​
Lily.​
8/18/2014​
7.54​
3/1/2022​
4.00​
Zoe.​
8/4/2014​
7.58​
3/1/2022​
3.00​
Lola.​
6/23/2014​
7.69​
3/1/2022​
5.00​
Pet NameBirthdayAgeEvent DateScore
Button​
3/1/2022​
0.00​
3/1/2022​
No Need​
Bear​
7/13/2020​
1.63​
3/1/2022​
5.00​
Bullet​
7/1/2020​
1.67​
3/1/2022​
2.50​
Max​
6/1/2020​
1.75​
3/1/2022​
3.00​
Charlie​
2/1/2020​
2.08​
3/1/2022​
3.50​
Cooper​
4/1/2017​
4.92​
3/1/2022​
5.00​
Buddy​
3/1/2017​
5.00​
3/1/2022​
1.00​
Rocky​
7/1/2015​
6.67​
3/1/2022​
1.50​
Milo​
5/5/2015​
6.82​
3/1/2022​
4.50​
Jack​
1/12/2015​
7.14​
3/1/2022​
3.00​
Luna.​
1/1/2015​
7.17​
3/1/2022​
4.00​
Lucy.​
12/1/2014​
7.25​
3/1/2022​
3.50​
Rocket​
11/1/2014​
7.33​
3/1/2022​
3.50​
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
this will work if you have a raw data sheet. i added totals to the bottom table to verify all the numbers matched the top tables

----------------
Book1
ABCDEFGHIJKL
1AgeGlobalDEUSScoreGlobalDEUS
2Less than 1 Year918No Need716
31 Year133101211
42 Years2111.5211
53 Years2022101
64 Years2112.5211
75 Years4133523
86 Years3213.5734
97 Years1248411110
108 Years0004.5211
119 Years0005826
12Total471334Total471334
13
14
15AgeNo Need11.522.533.544.55Total
16Less than 1 Year70110000009
171 Year000022041413
182 Years00000110002
193 Years00000011002
204 Years00000001012
215 Years02000010014
226 Years00100010103
237 Years000002350212
248 Years00000000000
259 Years00000000000
26Total7221257112847
LOS
Cell Formulas
RangeFormula
B2:B11,I2:I11B2=SUM(C2:D2)
C2C2=COUNTIF(DE!$D:$D,"<=0.99")
D2D2=COUNTIF(US!$C:$C,"<=0.99")
C3C3=COUNTIFS(DE!$D:$D,">=1.0",DE!$D:$D,"<=1.99")
D3D3=COUNTIFS(US!$C:$C,">=1.0",US!$C:$C,"<=1.99")
C4C4=COUNTIFS(DE!$D:$D,">=2.0",DE!$D:$D,"<=2.99")
D4D4=COUNTIFS(US!$C:$C,">=2.0",US!$C:$C,"<=2.99")
C5C5=COUNTIFS(DE!$D:$D,">=3.0",DE!$D:$D,"<=3.99")
D5D5=COUNTIFS(US!$C:$C,">=3.0",US!$C:$C,"<=3.99")
C6C6=COUNTIFS(DE!$D:$D,">=4.0",DE!$D:$D,"<=4.99")
D6D6=COUNTIFS(US!$C:$C,">=4.0",US!$C:$C,"<=4.99")
C7C7=COUNTIFS(DE!$D:$D,">=5.0",DE!$D:$D,"<=5.99")
D7D7=COUNTIFS(US!$C:$C,">=5.0",US!$C:$C,"<=5.99")
C8C8=COUNTIFS(DE!$D:$D,">=6.0",DE!$D:$D,"<=6.99")
D8D8=COUNTIFS(US!$C:$C,">=6.0",US!$C:$C,"<=6.99")
C9C9=COUNTIFS(DE!$D:$D,">=7.0",DE!$D:$D,"<=7.99")
D9D9=COUNTIFS(US!$C:$C,">=7.0",US!$C:$C,"<=7.99")
C10C10=COUNTIFS(DE!$D:$D,">=8.0",DE!$D:$D,"<=8.99")
D10D10=COUNTIFS(US!$C:$C,">=8.0",US!$C:$C,"<=8.99")
C11C11=COUNTIFS(DE!$D:$D,">=9.0",DE!$D:$D,"<=9.99")
D11D11=COUNTIFS(US!$C:$C,">=9.0",US!$C:$C,"<=9.99")
B12:D12,I12:K12B12=SUBTOTAL(109,B2:B11)
J2:J11J2=COUNTIF(DE!$F:$F,H2)
K2:K11K2=COUNTIF(US!$E:$E,H2)
B16:K16B16=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,"<=0.99")
L16:L25L16=SUM(B16:K16)
B17:K17B17=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=1.0",RawData!$C:$C,"<=1.99")
B18:K18B18=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=2.0",RawData!$C:$C,"<=2.99")
B19:K19B19=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=3.0",RawData!$C:$C,"<=3.99")
B20:K20B20=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=4.0",RawData!$C:$C,"<=4.99")
B21:K21B21=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=5.0",RawData!$C:$C,"<=5.99")
B22:K22B22=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=6.0",RawData!$C:$C,"<=6.99")
B23:K23B23=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=7.0",RawData!$C:$C,"<=7.99")
B24:K24B24=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=8.0",RawData!$C:$C,"<=8.99")
B25:K25B25=COUNTIFS(RawData!$E:$E,LOS!B15,RawData!$C:$C,">=9.0",RawData!$C:$C,"<=9.99")
B26:L26B26=SUM(B16:B25)
 
Upvote 0
if you dont have a raw data sheet, this should work
------------------
Book1
ABCDEFGHIJKL
15AgeNo Need11.522.533.544.55Total
16Less than 1 Year70110000009
171 Year000022041413
182 Years00000110002
193 Years00000011002
204 Years00000001012
215 Years02000010014
226 Years00100010103
237 Years000002350212
248 Years00000000000
259 Years00000000000
26Total7221257112847
LOS (2)
Cell Formulas
RangeFormula
B16:K16B16=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,"<=0.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,"<=0.99")
L16:L25L16=SUM(B16:K16)
B17:K17B17=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=1.0",DE!$D:$D,"<=1.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=1.0",US!$C:$C,"<=1.99")
B18:K18B18=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=2.0",DE!$D:$D,"<=2.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=2.0",US!$C:$C,"<=2.99")
B19:K19B19=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=3.0",DE!$D:$D,"<=3.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=3.0",US!$C:$C,"<=3.99")
B20:K20B20=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=4.0",DE!$D:$D,"<=4.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=4.0",US!$C:$C,"<=4.99")
B21:K21B21=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=5.0",DE!$D:$D,"<=5.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=5.0",US!$C:$C,"<=5.99")
B22:K22B22=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=6.0",DE!$D:$D,"<=6.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=6.0",US!$C:$C,"<=6.99")
B23:K23B23=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=7.0",DE!$D:$D,"<=7.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=7.0",US!$C:$C,"<=7.99")
B24:K24B24=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=8.0",DE!$D:$D,"<=8.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=8.0",US!$C:$C,"<=8.99")
B25:K25B25=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=9.0",DE!$D:$D,"<=9.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=9.0",US!$C:$C,"<=9.99")
B26:L26B26=SUM(B16:B25)
 
Upvote 0
Solution
if you dont have a raw data sheet, this should work
------------------
Book1
ABCDEFGHIJKL
15AgeNo Need11.522.533.544.55Total
16Less than 1 Year70110000009
171 Year000022041413
182 Years00000110002
193 Years00000011002
204 Years00000001012
215 Years02000010014
226 Years00100010103
237 Years000002350212
248 Years00000000000
259 Years00000000000
26Total7221257112847
LOS (2)
Cell Formulas
RangeFormula
B16:K16B16=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,"<=0.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,"<=0.99")
L16:L25L16=SUM(B16:K16)
B17:K17B17=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=1.0",DE!$D:$D,"<=1.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=1.0",US!$C:$C,"<=1.99")
B18:K18B18=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=2.0",DE!$D:$D,"<=2.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=2.0",US!$C:$C,"<=2.99")
B19:K19B19=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=3.0",DE!$D:$D,"<=3.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=3.0",US!$C:$C,"<=3.99")
B20:K20B20=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=4.0",DE!$D:$D,"<=4.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=4.0",US!$C:$C,"<=4.99")
B21:K21B21=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=5.0",DE!$D:$D,"<=5.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=5.0",US!$C:$C,"<=5.99")
B22:K22B22=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=6.0",DE!$D:$D,"<=6.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=6.0",US!$C:$C,"<=6.99")
B23:K23B23=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=7.0",DE!$D:$D,"<=7.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=7.0",US!$C:$C,"<=7.99")
B24:K24B24=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=8.0",DE!$D:$D,"<=8.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=8.0",US!$C:$C,"<=8.99")
B25:K25B25=COUNTIFS(DE!$F:$F,'LOS (2)'!B15,DE!$D:$D,">=9.0",DE!$D:$D,"<=9.99")+COUNTIFS(US!$E:$E,'LOS (2)'!B15,US!$C:$C,">=9.0",US!$C:$C,"<=9.99")
B26:L26B26=SUM(B16:B25)
Thank you !
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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