Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to rotate data in cells
I have a worksheet that includes data on medical resident students. Each
student will rotate through 12 different departments in a year. Is there away to create a macro that will automatically shift the departments for each month so that the cell data shifts down one cell and to the right one cell? The last cell in a row would need to move to the first cell in the next column. Example: Doctor Jan Feb Mar Apr May June Smith IM Ortho Peds Neuro OB Surgery Thomas Surgery IM |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to rotate data in cells
"Sue" wrote: I have a worksheet that includes data on medical resident students. Each student will rotate through 12 different departments in a year. Is there away to create a macro that will automatically shift the departments for each month so that the cell data shifts down one cell and to the right one cell? The last cell in a row would need to move to the first cell in the next column. Example: Doctor Jan Feb Mar Apr May June Smith IM Ortho Peds Neuro OB Surgery Thomas Surgery IM Ortho Peds Neuro OB Sorry - I was not finished sending my example. Thank you for your help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to rotate data in cells
Hi Sue,
Does this do it Sub MoveData() Dim iLastRow As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row sSave = Cells(iLastRow, 13).Value Range("B2:M" & iLastRow).Cut Destination:=Range("C3") Range("N3:N" & iLastRow + 1).Cut Destination:=Range("B2") Range("C" & iLastRow + 1 & ":N" & iLastRow + 1).Cut Destination:=Range("C2") End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Sue" wrote in message ... I have a worksheet that includes data on medical resident students. Each student will rotate through 12 different departments in a year. Is there away to create a macro that will automatically shift the departments for each month so that the cell data shifts down one cell and to the right one cell? The last cell in a row would need to move to the first cell in the next column. Example: Doctor Jan Feb Mar Apr May June Smith IM Ortho Peds Neuro OB Surgery Thomas Surgery IM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I rotate the cells containing col. hds to a 65 degree angl | Setting up and Configuration of Excel | |||
How do i rotate data - see below | Excel Discussion (Misc queries) | |||
is it possible to rotate a group of cells? | Excel Discussion (Misc queries) | |||
How do I rotate Horazontial cells vertical, so part of the chart . | Excel Worksheet Functions | |||
How I do I rotate text in an excel cell? The rotate commands is g. | Excel Discussion (Misc queries) |