Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loops in macro

Status
Not open for further replies.

tinmar

Technical User
Mar 24, 2003
55
HK
If I have 7 rows eg monday, tuesday etc down to sunday, Im trying to write a macro so that each day it copys the top 6 rows and drops down by one row, so my top row is now sunday and my bottom row is satrday Is there a way to write this type of looping in a macro?
 
A starting point:
Rows("7:7").Cut
Rows("1:1").Insert Shift:=xlDown

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
just use Cut and Insert Cut Cells than you can take the bottom row and place it at tthe top, excel looks after moving everything else down.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
tinmar,

What are you really trying to accomplish?

Do you have actual data, other than the days of the week, that you need to sort,

OR

do you just want to have the CURRENT day of the week at the top of a blank form?

Skip,

[glasses] [red]Be advised:[/red]To be safe on the FOURTH, don't take a FIFTH on the THIRD, or...
You might not come FORTH on the FIFTH! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top