![]() |
|
#5
|
|||
|
|||
|
Assuming it's you, and not something that determines what columns to work on programmatically,
put your code inside a loop to use a variable for the column to work on. Replace the "B"'s you have in your code with that variable, for example... Code:
For j = 1 To 4
'which column to loop
col = Choose(j, "B", "K", "N", "X")
With Sheet2
LastRow = .Range(col & .Rows.Count).End(xlUp).Row
For i = 2 To LastRow
.Range(col & i).Value = .Range(col & i).Value / 3.3
Next i
'just format what's needed not entire columns
.Range(col & "2:" & col & LastRow).NumberFormat = "###0.0"
End With
Next j
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Table bottom border not performing well
|
herpez | Word Tables | 2 | 01-16-2017 03:43 PM |
| How to return after performing a search | WaltR | Word | 2 | 12-26-2014 05:15 PM |
Macro not Performing Formula Update as Expected
|
tandchas | Excel Programming | 7 | 06-27-2014 05:42 AM |
Performing filtering to tasks that occur during the next three months
|
jessy | Project | 1 | 05-30-2014 05:40 AM |
| Cumulative calculations for two columns in a table to be placed in the footer | noelr | Word VBA | 0 | 09-05-2013 04:18 PM |