can someone tell me what this means?

J

Jim

For j = Cells(Rows.Count, "A").End(xlUp).Row To 6 Step -1

i know about the for loop, im just not sure about the xlUp stuff. thanks
 
D

Don Guillett

Cells(Rows.Count, "A").End(xlUp).Row
will get you to the last row in col A from the bottom up. With many macros,
especially those that delete rows it is best to work from the bottom up. so
you start at the bottom and look at each row above
 
B

Bob Phillips

It just determines the last filled row by working from the (very) bottom row
up.
 
M

MacGuy

cells(row.count, is the number of rows on the sheet (65536 on xl 2003).
the end(xlup) moves to the first populated cell in column A - it's going
from the bottom of column A up, getting to the bottom of populated cells in
col A (same as [ctrl] + [up arrow key]).
counting from the bottom row to row 6 (numerically counting down from the
last row to row 6)...
 

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

Top