Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want a macro that inserts cells at column "F" and shifts the cells right <IF the cell value at column "H" meets certain criteria. something like: For each cell in Range(H1:H3500") If IsNumeric(cell.value) Then 'only numbers, nulls excluded ''''Insert three cells at "F" and shift right End If Next cell Thanks -- Sreedhar |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For RowCount = 1 To 3500
If IsNumeric(Range("H" & RowCount).Value) Then Range("F" & RowCount).Insert Shift:=xlToRight End If Next RowCount "Sreedhar" wrote: Hi, I want a macro that inserts cells at column "F" and shifts the cells right <IF the cell value at column "H" meets certain criteria. something like: For each cell in Range(H1:H3500") If IsNumeric(cell.value) Then 'only numbers, nulls excluded ''''Insert three cells at "F" and shift right End If Next cell Thanks -- Sreedhar |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try this: Dim cell As Range For Each cell In Range("H1:H3500") If IsNumeric(cell.Value) Then 'only numbers, nulls excluded cell.Resize(1, 3).Insert Shift:=xlShiftToRight End If Next cell Regards, Per On 19 Nov., 17:38, Sreedhar wrote: Hi, I want a macro that inserts cells at column "F" and shifts the cells right <IF the cell value at column "H" meets certain criteria. something like: * * * * *For each cell in Range(H1:H3500") * * * * * * * * * * *If IsNumeric(cell.value) Then 'only numbers, nulls excluded * * * * * * * * * * * * * * * * ''''Insert three cells at "F" and shift right * * * * * * * * * * *End If * * * * *Next cell Thanks -- Sreedhar |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. that works.
-- Sreedhar "Joel" wrote: For RowCount = 1 To 3500 If IsNumeric(Range("H" & RowCount).Value) Then Range("F" & RowCount).Insert Shift:=xlToRight End If Next RowCount "Sreedhar" wrote: Hi, I want a macro that inserts cells at column "F" and shifts the cells right <IF the cell value at column "H" meets certain criteria. something like: For each cell in Range(H1:H3500") If IsNumeric(cell.value) Then 'only numbers, nulls excluded ''''Insert three cells at "F" and shift right End If Next cell Thanks -- Sreedhar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Blocked from Inserting individual cells or Insert Cut Cells | Excel Discussion (Misc queries) | |||
Inserting Cells | Excel Programming | |||
Inserting the same text in various cells | Excel Discussion (Misc queries) | |||
Inserting cells between cells with text | Excel Discussion (Misc queries) | |||
Inserting cells | Excel Programming |