Countif using a changing date range and unique values

irampuria1

New Member
Joined
Nov 29, 2016
Messages
3
I am building a KPI dashboard using data pulled from external sources - one of the metrics I am trying to measure is "No. of Unique Invoices" (in essence the number of distinct & unique orders) received per week. We have a spreadsheet with the "Shipping Date" in Column A, "Product Name" in Column B and "Invoice No." in Column E, since multiple products may be bought under the same invoice number.

A B E
11/01 Product A 1
11/13 Product A 2
11/23 Product B 2
11/24 Product A 2
11/26 Product B 3
11/26 Product C 3

What I am trying to do is have the "Weekly No. of Unique Invoices" update automatically whenever the sheet is refreshed based on the "TODAY()" date. For the week of the 11/26, the Unique No. of Invoices per week would be "2." I need a formula that can (1) look up the date in column A to isolate the range as being between today() and today()-7, and (2) then count the number of distinct invoice numbers within that range of dates.

Sorry for the convoluted explanation, but this has been a tricky process to reconcile.

Thanks in advance for any help.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi Irampuria,
something like this?
=COUNTIFS(A2:A13,"<="&TODAY(),A2:A13,">="&TODAY()-7)
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,215,582
Messages
6,125,659
Members
449,247
Latest member
wingedshoes

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