Macro or IF statement??? HELP!
Thanks for all the help - have it sussed now. Spreadsheet
working beautifully!!
Cheers for that!
Julia
-----Original Message-----
Hi Chris,
Re-reading my response to Julia, I see that my manual
solution omitted the
necessary first line:
Select the Sort Code Range
as shown explicitly in the VBA solution.
My apologies.
---
Regards
Norman
"chris" wrote in
message
...
This is a wholesale approach: if your just looking for
any blank cell,
but if you have intermittent blank cells within your
range, but are still
part of a valid account record they will be deleted too.
So be cautious how
you use this. If you need to have a set of criteria
before you delete a row
more sophisticated code is required.
----- Norman Jones wrote: -----
Hi Julia,
You can do this manually:
F5 key | Special | Blanks | ok
Edit | Delete | Entire Row | ok
If you need a programming solution, try:
Sub DelNoSortCodes()
Dim Rng As Range
Set Rng = Range("B2:B1000") ' <-- Adjust to
your
SortCode
Range
On Error Resume Next
Rng.SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
---
regards,
Norman
"Julia Easter" wrote in
message
...
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
.
|