Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
Sub test() Dim sh1 As Sheets, sh2 As Sheets, n As Long, i As Long, rw As Long Set sh1 = Sheets("Sheet1") Set sh2 = Sheets("Sheet6") n = 20 '------------------------- may be adapt to Cells(sh1.Rows.Count, 1).End(xlUp).Row For i = 1 To n If sh1.Cells(i, 19) = "x" Then rw = Cells(sh2.Rows.Count, 1).End(xlUp).Row + 1 sh1.Rows(i).Copy sh2.Cells(rw, 1) End If Next End Sub isabelle Le 2015-04-10 23:13, a écrit : If sheet1 has an x in column S copy sheet1 entire row to next blank row in sheet 6 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro-if condition met-copy and paste row to new sheet | Excel Programming | |||
Copy Specific Cells To A New Sheet On Condition | Excel Programming | |||
Copy from one Sheet and paste on another sheet based on condition | Excel Discussion (Misc queries) | |||
copy data to another sheet on condition | Excel Worksheet Functions | |||
Copy certain cells from one sheet to another with a condition | Excel Worksheet Functions |