Spreadsheet has column A:R. I want to delete entire row if column A is blank

I have a spreadsheet that has columns A through R.  Columns A,B,C contain a users name.  If column A is blank then I would like to delete the entire row and keep only the rows that have data in Column A (no last name,delete row)
Column A = LastName
               B = FirstName
               C=  MIDNAME

The other columns contain business information.  So if there is no user attached to this business, then delete the entire row.
kvrogersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThomasMcA2Commented:
Does the solution have to use VBA? If the solution does not need to be done every day, it's much easier to use built-in functions:

1) Enable filtering
2) Filter column A so it only shows blanks
3) Delete all lines shown
4) Clear the filter
0
kvrogersAuthor Commented:
I am designing this for a  end user who only wants to click a macro to do everything.  The table will be updated and ALL the rows where column A is blank will be deleted.
0
Ramesh VCommented:
Please use the following code:

Sub Check_Blank_And_Delete_Entire_Row()
Dim wb As Workbook
Dim ws As Worksheet
Dim lLastRow As Long
Set wb = ThisWorkbook
Set ws = wb.Sheets("Sheet1")
lLastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
    For i = 2 To lLastRow
        If Sheets(1).Range("A" & i).Value = "" Then
            Cells(i, 1).EntireRow.Delete
        End If
    Next i
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ramesh VCommented:
Delete one by one or store the row numbers in a string and delete at the end.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.