Return the Sum of a set of Data based on multiple dynamic criteria

sopphiron

New Member
Joined
Jan 14, 2024
Messages
3
Office Version
  1. 2021
Hi,

I have a set of data similar to what you can see below:


Book1
K
5
Sheet1


I want to filter the data in "Purchase Records" based on the 3 filters of year season, month, with overall count and price being displayed in the "Filtered Purchase Records" table, I can use the sumifs function but what I want is that, the filter should be dynamic in a sense that, if I don't enter any of the 3 filters the data be displayed based on the remaining two. for instance:

if I enter the year 2021, and leave season and month filters empty, all of the purchased pens and papers be displayed in the filtered table
or
if I enter 2021 and april, the results be filtered based on this criteria
or
if I enter spring, and leave year and month empty, the smaller table shows the purchased items in the spring of 2021 and 2022.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
The table is shown here:

Book1
ABCDEFGHIJKLMNOP
1
2Purchase Records
3noyearseasonmonthproductcountunit pricetotal priceFiltersyearseasonmonth
412021springaprilpaper20501000
522021springaprilpen10550
632021springmaypaper1550750Filtered Purchase Records
742022springaprilpaper1751867noproductcountunit pricetotal price
852022springmaypen2051001paper
962022springmaypen3051502pen
1072022springjunepaper206012003
1182022springjunepaper216012604
1292022winterjanuarypen2061205
13102022winterfebruarypen3061806
147
158
169
1710
18
Sheet1
Cell Formulas
RangeFormula
L8:L9L8=UNIQUE(F4:F13)
I4:I13I4=H4*G4
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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