how to get unique values from column with 5 criteria

04lobopr

New Member
Joined
Sep 22, 2014
Messages
2
trying to get unique claim number between two dates with criteria set to MIG in column L

current formula being used yeilds a N/A error message


=SUM(IF(FREQUENCY(IF(DataSheet!A8:A5000=Banner!K9,IF(DataSheet!K8:K5000>=Banner!C9,IF(DataSheet!K8:K5000<=Banner!G9,IF(DataSheet!L8:L5000="MIG",MATCH(DataSheet!D8:D5000,D8:D5000,0))))),ROW(DataSheet!D8:D5000)-ROW(DataSheet!$D$8))+1,1))

Banner K9 is a text criteria
Banner C9 and G9 are dates

any help is much appreciated
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
17,019
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
trying to get unique claim number between two dates with criteria set to MIG in column L

current formula being used yeilds a N/A error message


=SUM(IF(FREQUENCY(IF(DataSheet!A8:A5000=Banner!K9,IF(DataSheet!K8:K5000>=Banner!C9,IF(DataSheet!K8:K5000<=Banner!G9,IF(DataSheet!L8:L5000="MIG",MATCH(DataSheet!D8:D5000,D8:D5000,0))))),ROW(DataSheet!D8:D5000)-ROW(DataSheet!$D$8))+1,1))

Banner K9 is a text criteria
Banner C9 and G9 are dates

any help is much appreciated

Note errors in red

Try (corrections in blue)

=SUM(IF(FREQUENCY(IF(DataSheet!A8:A5000=Banner!K9,IF(DataSheet!K8:K5000>=Banner!C9,IF(DataSheet!K8:K5000<=Banner!G9,IF(DataSheet!L8:L5000="MIG",MATCH(DataSheet!D8:D5000,DataSheet!D8:D5000,0))))),ROW(DataSheet!D8:D5000)-ROW(DataSheet!$D$8)+1),1))

Ctrl+Shift+Enter

Hope this helps

M.
 

04lobopr

New Member
Joined
Sep 22, 2014
Messages
2
Note errors in red

Try (corrections in blue)

=SUM(IF(FREQUENCY(IF(DataSheet!A8:A5000=Banner!K9,IF(DataSheet!K8:K5000>=Banner!C9,IF(DataSheet!K8:K5000<=Banner!G9,IF(DataSheet!L8:L5000="MIG",MATCH(DataSheet!D8:D5000,DataSheet!D8:D5000,0))))),ROW(DataSheet!D8:D5000)-ROW(DataSheet!$D$8)+1),1))

Ctrl+Shift+Enter

Hope this helps

M.


Thanks Marcela, this works but yeilds the wrong count

would you be able to advise how to add dates to this formula
. I need it to provide a unqiue count between two dates (date 1 and date2)

=SUM(IF(FREQUENCY(IF(DataSheet!$A$8:$A$5000=Banner!$K$9,IF(DataSheet!$L$8:$L$5000="MIG",DataSheet!$D$8:$D$5000)),IF(DataSheet!$A$8:$A$5000=Banner!$K$9,IF(DataSheet!$L$8:$L$5000="MIG",DataSheet!$D$8:$D$5000)))>0,1))

This gives an accurate count when i have two criteria, but when i add the date criteria it does not work.

Any help is much appreciated. Thank you!!
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
17,019
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Could you post a small data sample for testing purposes?

M.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,111
Messages
5,835,450
Members
430,357
Latest member
Greshapa

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
Top