Counting unique rows based on dynamic 2-d array condition

NJohn

New Member
Joined
Apr 15, 2015
Messages
2
I have a massive dataset and am preparing a dashboard based on this dataset.
On my dashboard, I have a drop-down menu that allows me to select a month of my choice, from Jan to Apr. Here is a snippet of the data that I am looking to target my formula for.
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Visitor Jan Feb Mar Apr
Jenny 2 3 0 1
Peter 2 0 1 3
Charley 0 2 4
Charley 1 2 2 3
Sam 1 4 2 3
Peter 2 2 5 0
John 3 3 6 9
Robin 4 0 7 0
</code>I am looking for a formula that will give me the number of unique visitors who have been active at least once in the month that I choose from the drop-down menu.
Hoping this is really clear, but if not, please feel free to shoot back your questions.
Thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Assuming that A1:E9 contains the data, and that G2 contains the drop-down menu, try...

A1:H9

VisitorJanFebMarApr
Jenny2301Mar5
Peter2013
Charley024
Charley1223
Sam1423
Peter2250
John3369
Robin4070

<tbody>
</tbody>

H2, confirmed with CONTROL+SHIFT+ENTER...

=SUM(IF(FREQUENCY(IF(INDEX($B$2:$E$9,0,MATCH(G2,$B$1:$E$1,0))>0,IF(LEN($A$2:$A$9)>0,MATCH("~"&$A$2:$A$9,$A$2:$A$9&"",0))),ROW($A$2:$A$9)-ROW($A$2)+1)>0,1))

Hope this helps!
 
Upvote 0
This is simply fantastic, Domenic. Just tried it and it is exactly what I was looking for. Helps a lot. Thanks a ton. :)
 
Upvote 0

Forum statistics

Threads
1,215,633
Messages
6,125,925
Members
449,274
Latest member
mrcsbenson

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