Re: Macro or IF statement??? HELP!

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Norman Jones (normanjones_at_whereforartthou.com)
Date: 05/26/04


Date: Wed, 26 May 2004 13:18:36 +0100

Hi Julia,

For the manual solution, you need to initially select the Sort Code range
and therefore the manual instructions should read:

    Select your Sort Code range
    F5 key | Special | Blanks | ok
    Edit | Delete | Entire Row | ok

---
Regards,
Norman
"Norman Jones" <normanjones@whereforartthou.com> wrote in message
news:OSFjTQxQEHA.2468@TK2MSFTNGP11.phx.gbl...
> 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" <egglett@hotmail.com> wrote in message
> news:1289b01c4430e$bbab5ef0$a301280a@phx.gbl...
> > 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
>
>