Macro/If Statement?????? HELP!

  • Thread starter Thread starter Julia Easter
  • Start date Start date
J

Julia Easter

Hi - I've got a stack of customer data that's been
extracted from a database in CSV format and then opened in
Excel

All's well apart from some of the accounts I dont need -
these are one's that have no deatils in the "Bank" "Sort
Code" "Account" columns.

My question is how do I go about getting Excel to look at
the blanks and automatically Delete them?

So far my little knowledge allowed me to make the
following if statement but it only tells me to
physically "DELETE" non-bank customers... I want to know
how I get to tell Excel to actually search for bloanks
then delete.... if that makes sence!!

HELP
Ta
Julia
 
Julia,

You can use a simple macro: Select a cell in the column where the blanks
are, and then run this macro:

Sub DeleteBlanks()
Activecell.EntireColumn.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP
 
Thanks for that - it works brill!
Ta
Julia
-----Original Message-----
Julia,

You can use a simple macro: Select a cell in the column where the blanks
are, and then run this macro:

Sub DeleteBlanks()
Activecell.EntireColumn.SpecialCells (xlCellTypeBlanks).EntireRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP




.
 
Julia,

You're welcome for that - anything for a compliment ;-)

Bernie
MS Excel MVP
 
Back
Top