Results 1 to 3 of 3

VBA: Convert Table to a Range

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    841

    VBA: Convert Table to a Range

    Hi,

    I have the following VBA code that converts a range into a Table and renames it.

    Can someone please suggest similar code that will convert a Table to a range?

    Thanks!


    Sub Test ()
    
    	'Convert Range to a Table
    	ActiveSheet.UsedRange
    	Range ("A1").Select
    	ActiveSheet.ListObjects.Add(xlSrcRange, Selection.CurrentRegion, , xlYes).Name = "MyTable"
    
    End Sub
    Last edited by andrewc; 05-27-2021 at 09:19 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Convert Range to Table for a specific range in each selected sheet
    By Wojtek1977 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2019, 05:46 AM
  2. Excel 2016 convert table to range
    By SEJ50 in forum Excel General
    Replies: 10
    Last Post: 03-16-2018, 10:05 AM
  3. Convert through Macro an Excel Table to a Range
    By GRajagopalan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2016, 10:22 AM
  4. Convert Table Format to Range Using VBA
    By mybest in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2014, 12:48 AM
  5. [SOLVED] need code that will convert a table to a range
    By RuthMP in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2014, 10:09 AM
  6. VBA how to convert a range to a table in excel 2010
    By LindaB1016 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2014, 11:26 PM
  7. VBA Code to Convert Table to Normal Range
    By aloha31 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 07:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1