View Single Post
 
Old 09-20-2018, 01:51 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Try this
Code:
Sub TransferData()
Dim i As Long, oLo As ListObject

Set oLo = ActiveSheet.ListObjects("Table9")

For i = 1 To 10
    If WorksheetFunction.CountA(oLo.ListColumns(i).DataBodyRange) = 0 Then
        'listcolumn(i) is empty so use it
        Exit For
    End If
Next i
    
If i = 11 Then
    oLo.DataBodyRange.ClearContents
    i = 1
End If

oLo.DataBodyRange.Cells(1, i).Resize(3).Value = Sheets("GerotorSelection").Range("C2:C4").Value
oLo.DataBodyRange.Cells(4, i).Resize(3).Value = Sheets("GerotorSelection").Range("E2:E4").Value
oLo.DataBodyRange.Cells(7, i).Resize(4).Value = Sheets("GerotorSelection").Range("E13:E16").Value
    
End Sub
Reply With Quote