Help to only count value once in RANGE

D_Spark

Board Regular
Joined
Feb 4, 2007
Messages
232
Hi all,

Can someone please assist me?
On a worksheet I have the following formula

{=SUM((V!$J$2:$J$5000=B5)*(V!$D$2:$D$5000=21))}

I wish to expand this formula so that each value in range (V!$A$2:$A$5000) matching the above criteria is on counted once
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi all,

Can someone please assist me?
On a worksheet I have the following formula

{=SUM((V!$J$2:$J$5000=B5)*(V!$D$2:$D$5000=21))}

I wish to expand this formula so that each value in range (V!$A$2:$A$5000) matching the above criteria is only counted once[/QUOTE]
 
Upvote 0
Try this formula

=SUM(IF(FREQUENCY(IF((V!$J$2:$J$5000=B5)*(V!$D$2:$D$5000=21)*(V!$A$2:$A$5000<>""),MATCH(V!$A$2:$A$5000,V!$A$2:$A$5000,0)),ROW(V!$A$2:$A$5000)-ROW(V!$A$2)+1),1))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0
Try this formula

=SUM(IF(FREQUENCY(IF((V!$J$2:$J$5000=B5)*(V!$D$2:$D$5000=21)*(V!$A$2:$A$5000<>""),MATCH(V!$A$2:$A$5000,V!$A$2:$A$5000,0)),ROW(V!$A$2:$A$5000)-ROW(V!$A$2)+1),1))

confirmed with CTRL+SHIFT+ENTER




Houdini by name, Houdini by nature: Your suggested worked like a treat, Thanks
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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