Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-20-2018, 01:51 AM
NoSparks NoSparks is offline Copy Data from different areas in a worksheet into a Table Windows 7 64bit Copy Data from different areas in a worksheet into a Table Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
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
 

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
Copy Data from different areas in a worksheet into a Table Appending unique data from one worksheet to existing data on another worksheet EdStockton Excel 1 08-06-2014 11:00 PM
Copy Data from different areas in a worksheet into a Table Cannot copy ->paste table structure but data pastes ok kangz Word 1 04-24-2012 04:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft