SUMIFS with a unique date range solution

AlainTV

New Member
Joined
May 10, 2021
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hello,
I need some help with a formula that will return the sum of the "Quantity" column, for a given "Product", from a unique "Purchased Date".
See sample data below.

ProductPurchased DateQuantity
Tomatoes15/03/20215
Potatoes28/04/20211
Capsicums29/04/20213
Tomatoes15/03/20212
Potatoes28/04/20211
Capsicums5/05/20216
Tomatoes8/03/20211
Potatoes14/04/20214
Capsicums21/04/20211
Tomatoes15/03/20212
Potatoes28/04/20211
Capsicums21/04/20216

I can use the SUMIFS function to return products and the sum of their respective products, and I can also retrieve the unique purchased date with the UNIQUE(date) function. However, I'm struggling to get them to work together.

Any help will be much appreciated.

Regards,
Alain
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCD
1ProductPurchased DateQuantity
2Tomatoes15/03/202159
3Potatoes28/04/202113
4Capsicums29/04/202133
5Tomatoes15/03/202129
6Potatoes28/04/202113
7Capsicums05/05/202166
8Tomatoes08/03/202111
9Potatoes14/04/202144
10Capsicums21/04/202117
11Tomatoes15/03/202129
12Potatoes28/04/202113
13Capsicums21/04/202167
Lists
Cell Formulas
RangeFormula
D2:D13D2=SUMIFS(C:C,A:A,A2,B:B,B2)
 
Upvote 0
Hello Fluff,
Thank you for your reply.
While your solution seems to meet the criteria, the end result is a bit different from what I need it to do.

I was trying to simply the query, but in reality what I need to do is to sum all the unique rows, for each of the products, back to a single subtotal cell.

The real requirement is for a Gantt Chart in Excel. (see screenshot attached)

I'm dealing with some duplicates, but given the structure of the document, I must retain the way the data is shown. Looking at the image, the Gantt Chart is designed to only enter full days, if you try to breakdown the task into hours, other parts of the Gantt Chart won't work. In essence, there may be 4 different rows (tasks) that can be achieved within the same day, ergo we shouldn't need to add them to the total, we just need to be able to filter by unique dates, and then sum those values.

I hope its clearer with my explanation. :rolleyes:

Regards,
Alain
 

Attachments

  • temp Excel.png
    temp Excel.png
    26.5 KB · Views: 7
Upvote 0
I'm afraid I have no idea what you are trying to do & it seems to be totally unrelated to your original question.
I was trying to simply the query
This is a very bad idea, as you get something that won't work. ;)
 
Upvote 0
I'm afraid I have no idea what you are trying to do & it seems to be totally unrelated to your original question.

This is a very bad idea, as you get something that won't work. ;)
Hi Fluff,
There is no easy way to look for unique date entries across the given column, so that we only include a single entry on the sum for rows that meet the criteria of "TASK = Commissioning" and "DATE = Unique date" before adding the WORK DAYS value to the total?

Thanks for your time and help
 
Upvote 0
You can use the sumifs function that showed for that.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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