Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Posted this two days ago but fear it has fallen by the wayside once off the
front page... obs is taken from an inputbox and the msgbox returns the correct value. Point of this is to go through the sheet row by row and delete any row where column D does not equal twice the value of obs. I'm not completely familiar with VBA and may well have screwed something up. "If cells (i,"D")..." line is giving the mismatch error. All help is much appreciated. MsgBox "Obs value is = " & obs For i = Cells(Rows.Count, "d").End(xlUp).Row To 2 Step -1 If Cells(i, "D") < obs * 2 Then Cells(i, "D").EntireRow.Delete Next i Range("D1:D65536").Select Selection.Delete |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
VBA code to delete rows | Excel Discussion (Misc queries) | |||
[Q] Save As throws type mismatch error in control's code? | Excel Discussion (Misc queries) | |||
code to delete rows | Excel Discussion (Misc queries) |