Re: One more macro
From: Grace (Whooshbopbang4_at_adelphia.net)
Date: 06/08/04
- Next message: Paul James: "Re: how to Pause a VBA procedure until user presses Enter"
- Previous message: NorTor: "Userform: Textbox changing with selection in combobox (list)"
- In reply to: Grace: "Re: One more macro"
- Next in thread: mudraker: "Re: One more macro"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 13:04:49 -0700
Actually. though I would still appreciate any time-saving suggestions per my
prior, as yet unanswered, post, I have since noticed a pattern, about 50
rows of data (that I want to keep), followed by about 13 almost empty rows
(that I want to delete), that I believe won't ever change and which I can
exploit to save oodles of time.
1) I want the macro to go to cell A14.
2) Then I want to go end-down.
3) Wherever the cursor lands after end-downing, I want to delete that row
and the next 12 rows. However, if this brings you to row 65536, I simply
want to return the cursor to cell A1 and end the macro.
4) Repeat (at the very most, in my wildest imagination, this could be
repeated up to 1,400 times) steps 2 and 3 until the macro is ended (as
defined in step 3)
I note that it seems that (at least when done manually), at the end of step
3, the cursor will be in the first row of the next datablock. I assume
the cursor is, in essence, in column A, though, perhaps, the column position
is not really defined. But, it appears that, if I repeat step 2, the cursor
returns to column A, which is where I want it to be.
That's it! Can you help me, please?
Grace
"Grace" <Whooshbopbang4@adelphia.net> wrote in message
news:GoqdnTZe2ZT4f1jdRVn-hw@adelphia.com...
> Actually, there is one other little problem. Usually, these files can
have
> 10,000 rows. It seems like this takes maybe 10 minutes. Is there a way
to
> make this measurably faster, other than upgrading my year-old computer?
> Something like turning calc off or screenupdating off? If so, kindly tell
> me the commands.
>
> D
>
> "mudraker >" <<mudraker.17gohe@excelforum-nospam.com> wrote in message
> news:mudraker.17gohe@excelforum-nospam.com...
> > Grace
> >
> >
> > It looks like a . disappeeared out of my code some how
> >
> >
> > My code looks upwards in column A from the very last row until it
> > finds an entry in column A
> >
> > As you last row of totals does not have an entry in column A my code
> > does not see that row
> >
> >
> > This version finds the last used row on the *** regardsless of which
> > column that entry
> >
> >
> > Sub Take3()
> > Dim lRow As Long
> >
> > For lRow = Cells.Find(what:="*", _
> > SearchOrder:=xlByRows, _
> > SearchDirection:=xlPrevious).Row To 21 Step -1
> >
> > If Not IsNumeric(Cells(lRow, "a")) _
> > Or Cells(lRow, "a") = "" Then
> > Rows(lRow).Delete
> > End If
> >
> > Next lRow
> >
> > lRow = Cells.Find(what:="*", SearchOrder:=xlByRows, _
> > SearchDirection:=xlPrevious).Row
> > Range("a21:e" & lRow).Sort _
> > Key1:=Range("B21"), Order1:=xlAscending, _
> > Header:=xlGuess, OrderCustom:=1, _
> > MatchCase:=False, Orientation:=xlTopToBottom
> >
> > End Sub
> >
> >
> > ---
> > Message posted from http://www.ExcelForum.com/
> >
>
>
- Next message: Paul James: "Re: how to Pause a VBA procedure until user presses Enter"
- Previous message: NorTor: "Userform: Textbox changing with selection in combobox (list)"
- In reply to: Grace: "Re: One more macro"
- Next in thread: mudraker: "Re: One more macro"
- Messages sorted by: [ date ] [ thread ]