Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88087

Find unique values in 2 columns on a sheet

$
0
0

I am trying to create a UDF for finding unique values combining 2 columns. I have a sheet containing data about the employees of my company. I need to count the number of employees of a specific location. Problem is, some employees appear multiple times on a specific location due to the nature of the dataset. The formula for counting the unique cells is not the problem, I use:

IF(SUMPRODUCT(($A$1:$A1=A1)*($B$1:$B1=B1))>1;0;1)

What I want though is to be able to use this function in other sheets whereby I, or another user chooses the value of the columns in which to search for values.

I tried to write the formula but, since I am fairly new to VB, I cannot think of how to get the $-signs in the formula.

Anyone got an idea or a premade script I could adapt to my own needs?


Viewing all articles
Browse latest Browse all 88087

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>