I am trying to create a macro that looks at a named range of cells and counts the amount of unique values within that name. As follows:
Excel
The picture above is from cells A1 to E8. The range in red is a named range called "456." The range in blue is the range I need evaluated for unique values. As of right now, I have been able to get the code to work all the way to Excel selecting the area in blue, but I have not been able to write code that spits out the true amount of unique values within the blue-contoured range.
Right now, the code I have in place looks at the spreadsheet, sorts it by CUSTOMER number, creates a space in between the different customers and then selects the range I need to evaluate. The goal I am trying to accomplish is to have the code identify whether a single client has multiple, or just one POP # and then have it make decisions as to continue with the rest of the code in one direction or another.
Thank you so much!
I tried using the countA and unique functions within Excel but I much rather have VBA just make a decision and not have Excel calculate the output because I know multiple people will have access to this spreadsheet and they will for sure tamper with the formulas.
Excel
The picture above is from cells A1 to E8. The range in red is a named range called "456." The range in blue is the range I need evaluated for unique values. As of right now, I have been able to get the code to work all the way to Excel selecting the area in blue, but I have not been able to write code that spits out the true amount of unique values within the blue-contoured range.
Right now, the code I have in place looks at the spreadsheet, sorts it by CUSTOMER number, creates a space in between the different customers and then selects the range I need to evaluate. The goal I am trying to accomplish is to have the code identify whether a single client has multiple, or just one POP # and then have it make decisions as to continue with the rest of the code in one direction or another.
Thank you so much!
I tried using the countA and unique functions within Excel but I much rather have VBA just make a decision and not have Excel calculate the output because I know multiple people will have access to this spreadsheet and they will for sure tamper with the formulas.