Count the number of values that satisfy criteria in two separate columns but only count the first example of each paired criteria

Fitzy22

New Member
Joined
Jan 19, 2022
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi,

Really hoping someone can help me here, any assistance will be thoroughly appreciated!!

I am trying to write a formula that will count the number of values greater than 0 occurring in one column of an Excel spreadsheet, but only the first instance of each category which is in a second column.

The image shows four values greater than zero (circled). One for Acarina at the top and three for Coleoptera further down. The count that I want from this dataset would be two as I don't need to count the Coleoptera duplicates.

Note that I don’t need to sum the values in the right column, it's a count only.

I hope I have explained myself adequately and really keen to provide further information if needed.

Many thanks, Anton.
 

Attachments

  • Screenshot 2022-01-19 212732.jpg
    Screenshot 2022-01-19 212732.jpg
    109.9 KB · Views: 24

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi & welcome to MrExcel.
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(B2:B1000,G2:G1000>0)))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(B2:B1000,G2:G1000>0)))
Absolutely perfect, thanks Fluff!!

I had been messing around with every convoluted equation imaginable and this was just brilliant.

Cheers mate.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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