+ Reply to Thread
Results 1 to 3 of 3

Creating Tables with Changing Numbers of Rows and Columns

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Arlington, VA
    MS-Off Ver
    2010
    Posts
    10

    Creating Tables with Changing Numbers of Rows and Columns

    Hi there!

    So, I have searched the Internet and cannot seem to find the correct line of code.

    I wish to create a program that turns a range into a table. I know the base code--see below. The beginning is my set up, and it is the last line that I am struggling with for right now.


    However, I can't seem to figure out how to write the Range so that the Table is only as large as the data in the worksheet. If there isn't a way to do this, then I assume the answer would be to make the entire worksheet a table?

    My data is polling data and is constantly changing both in the number of rows and the number of columns. I am trying to find a way to automate reports we write. So the ultimate goal with the table is to use structured referencing to subtotal all of the responses to questions and copy the information into another spreadsheet. I am using Excel 2010. If there is any more information that ought to be provided, let me know!

    I am also not sold on doing this as a Table, but since the position of what needs to be counted frequently I figured the table approach with structured references would be my best bet. This is my first major VBA project, and am learning on the fly.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Creating Tables with Changing Numbers of Rows and Columns

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    Arlington, VA
    MS-Off Ver
    2010
    Posts
    10

    Re: Creating Tables with Changing Numbers of Rows and Columns

    Thanks mrice! It worked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. creating a function that find matches between 3 columns in two different tables
    By EX-MACHINA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2010, 03:45 AM
  2. Creating Pivot tables using dynamic columns
    By Sakuntala in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2009, 05:30 AM
  3. Creating several tables from 1000s of rows of data
    By nicktresco in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-23-2008, 06:15 AM
  4. Replies: 9
    Last Post: 02-08-2008, 10:09 PM
  5. [SOLVED] columns changing to numbers
    By Pablo in forum Excel General
    Replies: 2
    Last Post: 03-04-2005, 07:06 PM

Tags for this Thread

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