Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I been sent macro by one of online friend . This macro copies entire
row from sheet1 to sheet2. what should i do that this macro only copy rows from cell A to cell F instead of coping entire row. please any body can give any suggestions or macro Sub movedata() OldShRowCount = 1 NewShRowCount = 2 With Sheets("Sheet1") Do While .Range("D" & OldShRowCount) < "" If (.Range("D" & OldShRowCount) = .Range("D" & (OldShRowCount + 1))) And (.Range("E" & OldShRowCount) < .Range("E" & (OldShRowCount + 1))) Then ..Rows(OldShRowCount).Copy Destination:=Sheets("Sheet2").Rows(NewShRowCount) NewShRowCount = NewShRowCount + 1 End If OldShRowCount = OldShRowCount + 1 Loop End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Value correction | Excel Discussion (Misc queries) | |||
Code correction pls help | Excel Programming | |||
VBA Code Correction | Excel Programming | |||
correction | Excel Discussion (Misc queries) | |||
two arrays correction | New Users to Excel |