schedule

JeremyGraham95

New Member
Joined
Jan 12, 2016
Messages
19
I am working on a task assignment tool that simply rotates 9 cells with the click of a button. I am not very good with code and am having trouble finding an easy method to complete this tool. it will rotate the cells in rand A7:A15 and every other cell would just work off of those cells. please help
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
here is the code i have put together so far. it doesnt seem to rotate down one row each time the button is clicked. P.S. i only want cells A7:A14 to rotate


'count the number of rows to be rotated
myRows = Application.WorksheetFunction.CountA(Range("A7:A14"))
myLast = Cells(myRows, 2)
For i = 0 To myRows - 2
Cells(myRows - i, 2) = Cells(myRows - i - 1, 2)
Next i
Cells(1, 2) = myLast
 
Upvote 0
Is this what you want? First select the range (e.g. A7:A15), then run this macro.
Code:
Sub RotateSelection()
'Select the cells you want to rotate, then run this macro
With Selection
    .Cells(.Rows.Count, 1).Cut
    .Cells(1, 1).Insert shift:=xlDown
End With
End Sub
 
Upvote 0
so this works; however i have multiple cells with "=B10" as the value and once i click the button to rotate the cells that value changes. the whole table relies on the 8 cells that are rotating. how do i change the formula to not adjust for every time the button is pressed??
 
Upvote 0
so this works; however i have multiple cells with "=B10" as the value and once i click the button to rotate the cells that value changes. the whole table relies on the 8 cells that are rotating. how do i change the formula to not adjust for every time the button is pressed??
Sorry, I have no idea what your table looks like or which cells you are referring to. It would help if you post your layout and show the cells you want to rotate and any formulas that are in those cells.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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