Moving data

Laddr

New Member
Joined
Mar 27, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Ok so this is my issue I need to have a list of names in one row and a list of names in the second row however the names in the second row need to move in a rotation. So name the in cell one would move to 2, 2 would go to 3 and 3 would go to 1. There will be more than three names rotating just used that as an example is there a way to do this please and thank you
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Please post a sample data with the expected result. Thanks.
 
Upvote 0
Excel Formula:
=IF(ROW($A$2:$A$7) = ROW($A$2), OFFSET($A$2:$A$7, ROWS($A$2:$A$7)-1, 0), OFFSET($A$2:$A$7, -1, 0))

1711588515777.png
 
Upvote 0
VBA Code:
Option Explicit
Sub RotList()
Dim rng As Range, Rws As Long
Application.ScreenUpdating = False
If Range("A2") Is Nothing Then Exit Sub
    With Sheets("Sheet1")
        Set rng = .Range("A2:A10")
        Rws = rng.Rows.Count
        rng.Rows(1).Cut Destination:=rng.Rows(Rws).Offset(1)
      
        rng.Rows(2).Cut Destination:=rng.Rows(1)
        rng.Rows(2).Delete shift:=xlUp
        
    End With
Application.ScreenUpdating = True
End Sub

Image2.jpg
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,706
Members
449,118
Latest member
MichealRed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top