I'm trying to select a range of cells all on one line using the command
Range("C:G" & w).Select
where w is the for loop count variable. I keep getting a 1004 error so I replaced the C:G with one statement for each cell (C, D, E, F, G) which is ugly but works:
Range("C" & w).Select
...
Range("D" & w).Select
...
...
Range("G" & w).Select
...
Is there a way to modify my original code to achieve the same goal using about 30 less lines of code?
Range("C:G" & w).Select
where w is the for loop count variable. I keep getting a 1004 error so I replaced the C:G with one statement for each cell (C, D, E, F, G) which is ugly but works:
Range("C" & w).Select
...
Range("D" & w).Select
...
...
Range("G" & w).Select
...
Is there a way to modify my original code to achieve the same goal using about 30 less lines of code?