Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot guys it works now.
Ina Michael wrote: The Cell procedu Cells(i, "B").Value is wrong, the first parameter is a row index which you have, but the second is not a string it should be the number 2 if you want to use column B "ina" wrote: Hello guys, I have a problem with this small sub, I would like to delete the row it the value of one cell is egual of the value of cell + 1 but I have this problem delete method of range class failed and I do not know why? Sub deletequalrow() Dim LastRow As Long Dim i As Long With ActiveSheet.UsedRange LastRow = .Cells(.Cells.Count).Row End With For i = LastRow To 1 Step -1 If Cells(i, "B").Value = Cells(i - 1, "B").Value Then Rows(i).EntireRow.Delete End If Next i End Sub Ina |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem of selection.delete | Excel Worksheet Functions | |||
Problem Using Delete Key Because of Combobox | Excel Discussion (Misc queries) | |||
Delete problem | New Users to Excel | |||
Delete Sheets Problem | Excel Programming | |||
Name Delete Problem Again | Excel Programming |