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.