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

Excel: how can I check if values in Column A uniquely identify set of values in Column B?

$
0
0

I want to check if one column in an Excel file can be used as a unique identifier for data transformation purposes. Currently, I am comparing two columns, say Column A and Column B. I want to see if there is a one-to-one map between the set of values in Columns A and B.

Say the data looks like the below, then it is a positive outcome:

Column A     Column B
X            3
X            3
X            3
Y            5
Z            9

My idea was to do an =PRODUCT() formula of (number of unique values in B for each unique A) and if it is equal to 1, then it is a positive outcome. However, I'm not sure how to do this.

Can I do this with VBA? Essentially I just want a Boolean value as the output depending on whether it satisfies my condition.


Viewing all articles
Browse latest Browse all 90244

Trending Articles



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