Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I would like to select columns through loop so that all selected columns would be highlighted (like CRTL+select operation) for operations later on. Through recording Excel gave me this codes for the first three alternating columns: Sub Macro1( ) Range("B:B,D:D,F:F").Select Range("F1").Activate End Sub I tried to write a code, but it would not hold the columns highlighted (selected)! I was wondering what I am doing wrong. Thanks. For i = 1 To 3 n = 2 * i ActiveSheet.Columns(n).Select Selection.Activate Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
loop over columns | Excel Discussion (Misc queries) | |||
need some help with selecting a sheet in a loop again | Excel Programming | |||
How to select columns in loop | Excel Programming | |||
loop through columns | Excel Programming | |||
Loop 20 columns Help! | Excel Programming |