![]()
Sub MoveRecord() Dim WSF As Worksheet ' Invoice worksheet Dim WSD As Worksheet ' SalesData worksheet Dim NextRow As Long Set WSF = Worksheets("Invoice") Set WSD = Worksheets("SalesData") NextRow = WSD.Cells(Rows.Count, 1).End(xlUp).Row + 1 With WSF WSD.Cells(NextRow, 1).Resize(1, 10).Value = Array(.[F6], .[F6], .[F5], .[A18], .[b18], .[c10], .[c21], [d21], .[f21], .[b21]) NextRow = NextRow + 1 WSD.Cells(NextRow, 1).Resize(1, 10).Value = Array(.[F6], .[F6], .[F5], .[A18], .[b18], .[c10], .[c22], .[d22], .[f22], .[b22]) If .[C23] <> "" Then NextRow = NextRow + 1 WSD.Cells(NextRow, 1).Resize(1, 10).Value = Array(.[F6], .[F6], .[F5], .[A18], .[b18], .[c10], .[C23], .[d23], .[f23], .[b23]) End If If .[C24] <> "" Then NextRow = NextRow + 1 WSD.Cells(NextRow, 1).Resize(1, 10).Value = Array(.[F6], .[F6], .[F5], .[A18], .[b18], .[c10], .[C24], .[d24], .[f24], .[b24]) End If End With End Sub
Bookmarks