SUMIFS using multiple criteria

harriet60

New Member
Joined
Apr 6, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I couldn't get my previous request to work am looking for a workaround.
Is it possible to SUMIFS using both week and year as a criteria?
ie: SUMIFS (if weeks falls on or between those selected from drop down menu and year falls on or between those selected from drop down menu)
** Return data from week 2, 2021-2022 to week 51, 2021-2022 OR from week 16, 2021 to week 5, 2022-23

Have attached an example (am working across tabs)

Thanks in advance for any help anyone can give :)
 

Attachments

  • Example.2.JPG
    Example.2.JPG
    48.4 KB · Views: 12

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
created helper lists to make the validation cleaner
Book1
ABCDEFGHIJKLM
1week from2year2021-2022academic yearweeknamescoreresultyearsweeks
2week to3year2022-20232021-20222jack2322021-2022
32021-20222jo6032022-2023
42021-20223jack424
5namescoreresult2021-20224jo12
6jack852022-20232jack20
7jo1332022-20232jo41
82022-20234jack05
92022-20233jo32
Sheet1
Cell Formulas
RangeFormula
L2:L4L2=UNIQUE(week)
M2:M3M2=UNIQUE(year)
B6:B7B6=SUMIFS(I:I,H:H,A6,G:G,">="&$B$1,G:G,"<="&$B$2,F:F,">="&$D$1,F:F,"<="&$D$2)
C6:C7C6=SUMIFS(J:J,H:H,A6,G:G,">="&$B$1,G:G,"<="&$B$2,F:F,">="&$D$1,F:F,"<="&$D$2)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
week=Sheet1!$G$2:$G$9L2, B6:C7
year=Sheet1!$F$2:$F$9M2, B6:C7
Cells with Data Validation
CellAllowCriteria
B1:B2List=$L$2:$L$4
D1:D2List=$M$2:$M$3
 
Upvote 0
I think you'd need some helper columns to make this work properly with sumifs because you are essentially wanting text to be treated as dates. If you concatenated the week number (formatted to always show 2 digits) onto the end of the year, then you could use >= and <= criteria.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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