Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Ron, I was not aware of the xlSpecialCellsType limitation. Could
save me some grief in the future. "Ron de Bruin" wrote in message ... For The OP If Rick's code do what you want be aware of this possible problem http://www.rondebruin.nl/specialcells.htm Have a nice day -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Rick Rothstein" wrote in message ... If some rows do not have on-hand or ordered numbers I want to delete those rows. I note you said "or" and not "and" in the above, so I'm guessing that within a given row, if either the cell in Column B **or** the cell in Column C (but not necessarily both) are empty, then you want the entire row deleted. I'm guessing the should work for you... Sub DeleteUnneededRows() On Error Resume Next Columns("B:C").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete End Sub -- Rick (MVP - Excel) "JKWParrott" wrote in message ... I'm trying to figure out if I can set up a macro to delete rows if they do not contain anything in specific columns. For example, I have product codes in column A and totals for on-hand and ordered numbers in columns B and C. If some rows do not have on-hand or ordered numbers I want to delete those rows. Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Excel Programming | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Help!!! I have problem deleting 2500 rows of filtered rows | Excel Programming | |||
deleting hidden rows so i can print only the rows showing?????? | Excel Worksheet Functions |