Here's the question from my teacher:
1. insert a new procedure and put this code into a for loop:
Range(Cells(4, 2), Cells(458, 2)).Name = "Stock1"
Range(Cells(4, 3), Cells(458, 3)).Name = "Stock2"
Range(Cells(4, 4), Cells(458, 4)).Name = "Stock3"
Range(Cells(4, 5), Cells(458, 5)).Name = "Stock4"
Range(Cells(4, 6), Cells(458, 6)).Name = "Stock5"
Range(Cells(4, 7), Cells(458, 7)).Name = "Stock6"
Range(Cells(4, 8), Cells(458, 8)).Name = "Stock7"
Range(Cells(4, 9), Cells(458, 9)).Name = "Stock8"
Range(Cells(4, 10), Cells(458, 10)).Name = "Stock9"
Range(Cells(4, 11), Cells(458, 11)).Name = "Stock10"
2. declare any necessary variables first
3. you should have only 1 for loop. This loop contains 1 line of code
I would appreciate help on this, the problems i am having is
a) doing this with only 1 for loop
b) creating something to loop the "stock#" range names
Thanks!!!
Bookmarks