Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
inserting columsns variable range
hello all,
i have a spreadsheet that is variable in range (number of columns can vary). i would like to create a macro that for each column in the worksheet, two new columns would be inserted to the left. i thought this would work, but i am running into problems... LastColumn = Cells.Find(What:="*", After:=[A1], _ SearchOrder:=xlByColumns, _ SearchDirection:=xlPrevious).Column LC = LastColumn For i = 2 To LC If Cells(5, i + 1) < "" Then Cells(5, i).Select Selection.EntireColumn.Insert Selection.EntireColumn.Insert End If Next i how do i go about accomplishing this? thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting variable outputs into different ranges | Excel Programming | |||
Using variable name as a value for inserting a row | Excel Programming | |||
Inserting Variable Number of Rows | Excel Programming | |||
inserting a variable into VB | Excel Programming |