Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What do i need to change in this piece of code so it copies the whol
row and not just the first column of the row? Sub movedata() Dim i As Integer Dim x As Integer Dim mySheet As Integer Dim mySheetRow As Integer i = 1 While Cells(i, 1) "" x = Cells(i, 1).Row Mod 8 If x = 1 Then mySheet = 1 mySheetRow = mySheetRow + 1 If mySheetRow = 0 Then mySheetRow = 8 Else mySheet = mySheet + 1 End If Worksheets(mySheet + 1).Cells(mySheetRow, 1) = Cells(i, 1) i = i + 1 Wend End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy code | New Users to Excel | |||
copy and use vba code | New Users to Excel | |||
copy and use vba code | Excel Discussion (Misc queries) | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming | |||
Copy Sheets minus Worksheet Change Event code & Macro Buttons | Excel Programming |