View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MSP77079[_47_] MSP77079[_47_] is offline
external usenet poster
 
Posts: 1
Default Conditional Row insertion problem

Of course it doesn't do anything. There are several problems:
1) you are trying to select a column, not a row (and not doing i
correctly in any case)
2) you need .Value instead of Value

You want something like this:

select the cell you want to check, then
thisRow = ActiveCell.Row
if cells(thisRow, "D").Value = 2 then
Cells(thisRow, "D").entireRow.Insert (xlShiftDown)

et ceter

--
Message posted from http://www.ExcelForum.com