View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Inserting cells using VBA

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