+ Reply to Thread
Results 1 to 3 of 3

Convert a dynamic data range into a table

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Convert a dynamic data range into a table

    Afteroon Guys,

    Great to join! Considering how much I use excel day in day out i'm surprised i haven't joined sooner.

    I've had a look through the web, and checked the forums here but can't find a solution.

    I have an excel file automatically scheduled to download from a program we use. The data needs to be formatted prior to be inserted into a database. This file will change in size in terms of the number of records it will store, but not the number of columns there will be.

    Essentially i'm looking for some code that will select the data range, and then convert this data range into a table.

    Any help will be greatly appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Convert a dynamic data range into a table

    Try running this after importing your new data...........
    Don't forget to change the sheet/range references to suit your database

    Please Login or Register  to view this content.
    Note that the above makes it look like a table but doesn't actually define it to Excel as such
    To do that you want code like the following

    Please Login or Register  to view this content.
    Last edited by AndyLitch; 05-01-2013 at 01:47 AM. Reason: Improvement
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Convert a dynamic data range into a table

    AndyLitch,

    Thank you, exactly what I was after.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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