Automating cell naming
Posted by Michael McGinnis on January 08, 2002 6:08 PM
I have a worksheet that contains yearly data in columns and labels on each row like this:
1999 2000 2001
ProfitBizA $5,000 $5,800 $6,000
ProfitBizB $3,400 $3,100 $3,500
ProfitBizC $7,900 $6,700 $8,500
I would like to name each cell by combining the description on the leftmost row with the year label on the top of each column. For ex., the cell containing $5,000 would be named "ProfitBizA1999" or some abbreviation like "PrA1999". So, I do the Insert -> Name -> Create thing and type in "PrA1999". Then I click on the cell to the right and do the Insert -> Name thing again, type in "PrA2000" (or edit the PrA1999 name from the existing list). Unfortunately, I have a worksheet like this that has ten year columns and 80 rows of businesses, meaning I have do the Insert -> Name thing 800 times! Can anybody suggest a macro or formula that would combine the description in the left column with the year in the top column and them apply the concatenated name as a name in the current cell, move one cell to the right, find the new combined name using the leftmost cell and the current top row, insert the new name in the current cell, and then keep repeating this until it ran out of cells with values in them? Thanks in advance for reading my lengthy post and thinking about my problem.