Count DISTINCT Values in column B if column A is not-empty

unclefish

New Member
Joined
Jun 8, 2023
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Dear Excelists,

i would like to count the distinct values in a column but only if the corresponding cell in another row is not empty.
In my example, i'd like to count the distinct values in column B, but only if the cells in coulmn A are not empty.
The result should be 6.

Distinct Values.JPG


I found a similar post asking where the condition is a specific text, rather than a non-empty cell. But I don't know how to adapt the solution suggested there in order to make it work for my problem (->non-empty cell)

Thank you very much for your comments!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I'm so sorry for having bothered you.
Apparently i already had the solution without having noted.
=ROWS(UNIQUE(FILTER(B2:B15,A2:A15<>"")))
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,699
Members
453,747
Latest member
tylerhyatt04

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