nathanstevenson
IS-IT--Management
Hi there,
Here is the problem:
I have to give unique IDs to 9 different sets of data stored
in 15 different columns in an Excel file.
So I need a loop that will number cell B1 - 1 and put it in cell A1 (i.e. the column to store the unique ID). It needs to then take cell B1 and compare it to cells B2-B1000. If B1 equals any other cells in this range, then it's corresponsing "A" cell needs to be numbered the same as B1. Once this is done for the whole range, it is then repeated using cell B2, and so on until it is done.
The trick comes in when I have to compare two or more columns to others. i.e. b1 and c1 need to be compared to b2 and c2 etc.
My main problem is how I store the values from the cells. Do I use named ranges? If so how? How do I refer to col a1 (i.e. the ID col), ito variables as opposed to fixed locations?
This loop also needs to be repeated a couple of times on dif data.
Here is the problem:
I have to give unique IDs to 9 different sets of data stored
in 15 different columns in an Excel file.
So I need a loop that will number cell B1 - 1 and put it in cell A1 (i.e. the column to store the unique ID). It needs to then take cell B1 and compare it to cells B2-B1000. If B1 equals any other cells in this range, then it's corresponsing "A" cell needs to be numbered the same as B1. Once this is done for the whole range, it is then repeated using cell B2, and so on until it is done.
The trick comes in when I have to compare two or more columns to others. i.e. b1 and c1 need to be compared to b2 and c2 etc.
My main problem is how I store the values from the cells. Do I use named ranges? If so how? How do I refer to col a1 (i.e. the ID col), ito variables as opposed to fixed locations?
This loop also needs to be repeated a couple of times on dif data.