Loop in Excel

K

Kahn

I have some Names in the Column A, from A1:A34. In this Range from A1
to A34 some rows are empty. I mean some rows have no name. My
requirement is that every week on Sunday I want my file to move last
name from A34 to A1. After that A1 should move to A2, A2 should move
to A3 and so on respectively. If there is no name in any of the row
that empty row should move as well respectively, regardless it have
the name or not. Could you please help me to fine the solution for
the
above problem. Somebody given me this solution before but that code
does not work at all. Thanks in advance !!!!
 
Joined
May 7, 2010
Messages
4
Reaction score
0
Dim strLast as String, i as Integer

strLast = Cells(34, 1)

For i = 34 to 2 step -1
Cells(i, 1) = Cells(i - 1, 1)
Next i

Cells(1, 1) = strLast
 
Last edited:

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