i there,
Im looking to assign all the cells in a table unique names based on the column and row headers.
The table below is an example of a table with values ranging from 1 to 25. They will be uniquely used later on for other calcs. Also note that the table size isnt fixed to 5x5 and will more likely range from 10x8 but this is just to show my idea/problem.
Reference Col 1 Col 2 Col 3 Col 4 Col 5
Row 1 value 1 value 2 value 3 value 4 value 5
Row 2 value 6 value 7 value 8 value 9 value 10
Row 3 value 11 value 12 value 13 value 14 value 15
Row 4 value 16 value 17 value 18 value 19 value 20
Row 5 value 21 value 22 value 23 value 24 value 25
The cells "value 1" through "value 25" should be assigned names so that the other program can call them directly where needed. I would like thus to assign the following names to the cells which can be derived by some concatenating and string editing. (in this case each sell name should be derived with =CONCATENATE("S",C$8,$A11) depending on where the table is located. This is also why I put in the reference cell in the top-left corner because that way the macro can pinpoint the table.
Reference Col 1 Col 2 Col 3 Col 4 Col 5
Row 1 SCol1Row1 SCol2Row1 SCol3Row1 SCol4Row1 SCol5Row1
Row 2 SCol1Row2 SCol2Row2 SCol3Row2 SCol4Row2 SCol5Row2
Row 3 SCol1Row3 SCol2Row3 SCol3Row3 SCol4Row3 SCol5Row3
Row 4 SCol1Row4 SCol2Row4 SCol3Row4 SCol4Row4 SCol5Row4
Row 5 SCol1Row5 SCol2Row5 SCol3Row5 SCol4Row5 SCol5Row5
My Question: Is there a Macro that I can use to give the names to the cells based on their column and row headers.
Bonus points for a macro that first checks the dimensions of the table/array pleas?
Thanks for any help possible.
Bookmarks