OFFSET function with multiple table

xdenama

New Member
Joined
Feb 12, 2016
Messages
39
Office Version
365
Does it make any difference we copy/paste values only?

VBA Code:
Sub CombineTables_v3()
  Dim i As Long
 
  Sheets.Add Before:=Sheets(1)
  For i = 2 To Sheets.Count
    With Sheets(i)
      If .ListObjects.Count > 0 Then
        .ListObjects(1).Range.Copy
        Sheets(1).Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlValues
      End If
    End With
  Next i
  Sheets(1).Rows(1).Delete
End Sub
Wow, I salute you, it's working. Thank for your time. I very appreciate...
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
45,918
Office Version
365
Platform
Windows
You're welcome. Glad we (seem to have) got there in the end. :)
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
6,258
This is the best way if could, because my table is live data, it's easy to refresh compare to copy and paste. Unfortunately my table have different headers name. Any idea, how to make it possible?
Sorry mate I don't use formulas so I can't help
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,865
Messages
5,507,801
Members
408,647
Latest member
gazmoz17

This Week's Hot Topics

Top