![]() |
|
|
|
#1
|
|||
|
|||
|
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
|
|
| Tags |
| columns, copy cells, count |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| copy data table from pdf to excel | DIMI | Excel | 1 | 07-10-2018 11:40 PM |
| Looking to copy select cells in table using dropdown list to paste to new table in another worksheet | CaptainRetired | Excel Programming | 18 | 01-04-2018 07:22 PM |
| Table - Allow Spellcheck and tick boxes in certain areas only | BarbW | Word | 10 | 03-09-2016 01:59 PM |
Appending unique data from one worksheet to existing data on another worksheet
|
EdStockton | Excel | 1 | 08-06-2014 11:00 PM |
Cannot copy ->paste table structure but data pastes ok
|
kangz | Word | 1 | 04-24-2012 04:05 AM |