Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
need some help on this one.
Is there a way to check to see if there is a value or not null for three cells in a row and if there is not, then delete the row? Example: I have sheets of customer information where each row is a different customer (name, address, ect..), but if they do not have a contact number (home, work, cell) i would like to delete them. I'm pretty sure that this can be done via macro, but don't know how. Any and all help is greatly appreciated! Thanks Vince |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
This will check the first 10 rows on the active worksheet and check if there are values in A:C Change to your situation Sub test() Dim a As Long For a = 10 To 1 Step -1 With Application.WorksheetFunction If .CountA(Range("A" & a & ":C" & a)) = 0 Then Rows(a).Delete End If End With Next a End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Vince" wrote in message ... need some help on this one. Is there a way to check to see if there is a value or not null for three cells in a row and if there is not, then delete the row? Example: I have sheets of customer information where each row is a different customer (name, address, ect..), but if they do not have a contact number (home, work, cell) i would like to delete them. I'm pretty sure that this can be done via macro, but don't know how. Any and all help is greatly appreciated! Thanks Vince |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete the test values, but do not delete the formulas | Excel Discussion (Misc queries) | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
How do i delete a macro in Excel 2003 when delete isn't highlight | Excel Discussion (Misc queries) | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions |