![]() |
Loop & Cell Reference
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 |
Loop & Cell Reference
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 |
Loop & Cell Reference
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 |
All times are GMT +1. The time now is 05:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com