Moving to next row below a selected range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Excel 2002, I need a Macro that will select a range containing data in a
spicific column, then move down one row belosw the rand and select all rows
from that point to bottom of worksheet and delete those rows. current my
Macro has the following lines:
Sheets("Supplier").Select
Range("A1:R220").Sort Key1:=Range("C2"), Order1:=xlAscending,
Key2:=Range _
("D2"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase _
:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
Range("C1").Select
Selection.End(xlDown).Select
(XXXXXXXXXXX)
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A2").Select
Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(5), _
Replace:=True, PageBreaks:=True, SummaryBelowData:=True
ActiveWindow.SelectedSheets.PrintPreview

In place of the (XXXXXXXXXX), I need a command that will move down one row
and then continue with the rest of the macro.
 
I appreciate the response, but when I tried that, the line turned yellow and
the macro wouldn't run.
 
Tom, how do I then get Excel to select all the rows from that point to the
bottom of the worksheet since I don't know what the starting row will be???
 
supposedly that is what this code does:


Only you know what you are trying to do and how your sheet is set up.

for that last command you might want
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top