formula to count unique values based on today's date

p4nny

Board Regular
Joined
Jan 13, 2015
Messages
246
Hi

I'm column B, i have a list of values (made of letter & numbers). In a column C I have date

column B e.g.
151_92861310053100</SPAN>
039_6B7453EFADA0B0FFF1986A56E61F20FC</SPAN>
151_92861310053100</SPAN>
151_92861310282700</SPAN>
151_92861310282700</SPAN>
151_92861310282700</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>



I would a formula to provide a unique count of B and filter for "today" on column C

Appreciate the help
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Perhaps:

=SUMPRODUCT(--($C$1:$C$6=TODAY()),--(MATCH($B$1:$B$6,$B$1:$B$6,0)=ROW($B$1:$B$6)))

Change the ranges to match your sheet. If your top row is not 1, use this instead:

=SUMPRODUCT(--($C$2:$C$6=TODAY()),--(MATCH($B$2:$B$6,$B$2:$B$6,0)=ROW($B$2:$B$6)-ROW($B$2)+1))
 
Upvote 0
Thanks for the reply.

Formula works..

Only issue is, if I extend the range to include blank cells, I get an error.
 
Upvote 0
You can add the IFERROR function around it:

=IFERROR(SUMPRODUCT(--($C$2:$C$6=TODAY()),--(MATCH($B$2:$B$6,$B$2:$B$6,0)=ROW($B$2:$B$6)-ROW($B$2)+1)),"")
 
Upvote 0
Hi,

My question is, why would this error?

This is the exact formula I've used:

=SUMPRODUCT(--($K$13:$K$4000=TODAY()),--(MATCH($B$13:$B$4000,$B$13:$B$4000,0)=ROW($B$13:$B$4000)-ROW($B$13)+1))

The range K13:K4000 (DATE) & B13:B4000 (ID to be unqiue'd) do contain blank cells.. As a result the formula does not work.

Appreciate the help and guidance
 
Upvote 0
Perhaps I've misunderstood your requirements. That formula should provide the number of unique items with today's date. Do you instead want a count for each item of how many items there are with today's date?
 
Upvote 0
Hi

I'm column B, i have a list of values (made of letter & numbers). In a column C I have date

column B e.g.
151_92861310053100
039_6B7453EFADA0B0FFF1986A56E61F20FC
151_92861310053100
151_92861310282700
151_92861310282700
151_92861310282700

<tbody>
</tbody>



I would a formula to provide a unique count of B and filter for "today" on column C

Appreciate the help

Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(1-($B$2:$B$400=""),IF($C$2:$C$400=TODAY(),MATCH("~"&$B$2:$B$400,$B$2:$B$400&"",0))),ROW($B$2:$B$400)-ROW($B$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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