I have a spread sheet with 5 coulmns (company/phone/fax/email/contact name)
Column A is completely filled with 22,000 company names and other information is dispersed throughout the spreadsheet (ie some have just phone, some just fax and contact, some have nothing but company name)
I want to delete all company entries that i have no information for; in columns b-e
Last edited by MattyNinja; 03-19-2010 at 03:17 PM. Reason: solved
You could add a formula in an unused column =COUNTA(B2:E2) and copy down, the filter for 0 and delete the visible rows.
Or use VBA:
Code:Sub x() Dim iRow As Long With ActiveSheet With Intersect(.UsedRange, .Columns("B:E")) For iRow = .Rows.Count To 1 Step -1 With .Rows(iRow) If WorksheetFunction.CountA(.Value) = 0 Then .EntireRow.Delete End With Next iRow End With End With End Sub
Last edited by shg; 03-17-2010 at 05:57 PM.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
You sir, are a gentleman and a scholar!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks