Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am sure this will be easy for the experts. I have 500 rows of data and each one seperately has to be copied to seperate row for calculations to occur. More specifically I want the 1st row, 5 columns, to be moved to th other cells for calculations and then it moves, loops, to the next ro which are moved to the cells for calculations, and so on 498 mor times. Any suggestions? Thank -- bforster ----------------------------------------------------------------------- bforster1's Profile: http://www.excelforum.com/member.php...fo&userid=1177 View this thread: http://www.excelforum.com/showthread.php?threadid=55711 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Get the code to do the copying with the macro recorder.
Bear in mind you can define a range with variables like this: Dim i As Long Range(Cells(i, 1), Cells(i, 5)) Look in the VBA help at the For Next loop. Combine the three. RBS "bforster1" wrote in message ... I am sure this will be easy for the experts. I have 500 rows of data and each one seperately has to be copied to a seperate row for calculations to occur. More specifically I want the 1st row, 5 columns, to be moved to the other cells for calculations and then it moves, loops, to the next row which are moved to the cells for calculations, and so on 498 more times. Any suggestions? Thanks -- bforster1 ------------------------------------------------------------------------ bforster1's Profile: http://www.excelforum.com/member.php...o&userid=11771 View this thread: http://www.excelforum.com/showthread...hreadid=557112 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This little macro does all the copying and looping but it doesn't do any
calsculations. Did you want the macro to do any calculations? This macro loops through all the occupied rows in Column A and copies each 5 column row to B600 in turn. HTH Otto Sub LoopCopy() Dim RngColA As Range Dim i As Range Set RngColA = Range("A1", Range("A" & Rows.Count).End(xlUp)) For Each i In RngColA i.Resize(, 5).Copy Range("B600") Next i End Sub "bforster1" wrote in message ... I am sure this will be easy for the experts. I have 500 rows of data and each one seperately has to be copied to a seperate row for calculations to occur. More specifically I want the 1st row, 5 columns, to be moved to the other cells for calculations and then it moves, loops, to the next row which are moved to the cells for calculations, and so on 498 more times. Any suggestions? Thanks -- bforster1 ------------------------------------------------------------------------ bforster1's Profile: http://www.excelforum.com/member.php...o&userid=11771 View this thread: http://www.excelforum.com/showthread...hreadid=557112 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to loop by chaning the cell reference? | Excel Programming | |||
reference 2 arrays in a For Loop | Excel Programming | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions | |||
Excel VBA Loop & Variable Reference | Excel Programming |