+ Reply to Thread
Results 1 to 4 of 4

Resize table to my used range

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Resize table to my used range

    I have a table where I log my requisitions, so about 12 columns of data per row, many with formulas. I have a macro that automatically inserts the next row, copying the pertinent formulas, and that works well for me when I'm entering a ton of different requests. My issue is that once a month I get about 20 requests at the same time. Except for the date the information on all of these requests exactly matches the information I entered last month, so my usual process is to filter to those requests from last month, copy them, and paste them under my table, change the date information (and the one or two other things that might have changed). I then resize my table to include those rows.

    That last step is what I need help with. I'd like to create a quick macro that resizes my table to the size of my usedrange. I tried working with my recorded code, but can't figure how to get the usedrange property worked in. Any help would be appreciated.
    Please Login or Register  to view this content.
    Last edited by jomili; 07-20-2016 at 04:06 PM.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Resize table to my used range

    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Resize table to my used range

    No, I understand that one well enough. I thought of that route myself, but thought that there would be some way to use either the UsedRange or CurrentRegion properties. Heres the way I had it worked out:
    Please Login or Register  to view this content.
    But I guess to make it versatile enough to use for more than this one table I'll have to put in some code to determine the first row and first and last columns of the block of data. UsedRange would make that much easier.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Resize table to my used range

    Okay, here's my finished code:
    Please Login or Register  to view this content.
    UPDATE: Changed it to convert my used range to a table if a table doesn't already exist.
    Last edited by jomili; 07-21-2016 at 01:56 PM.

+ 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. Macro to Resize a Table
    By brent_milne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2015, 11:37 AM
  2. UserInterFaceOnly and resize of table
    By wibble98 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2014, 10:08 AM
  3. [SOLVED] Resize table to same row count as a piovt table
    By djon5020 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2014, 01:43 AM
  4. Resize range (table) in VBA based on last row value in another worksheet
    By Erin1986 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 01:36 AM
  5. Add row to end of table and resize table automatically
    By cdthimann in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2013, 03:30 AM
  6. [SOLVED] Is it possible to resize a table and keep format & formulas?
    By NathanC in forum Excel General
    Replies: 1
    Last Post: 11-03-2012, 12:04 AM
  7. [SOLVED] Range.Delete and Range.Resize.Name performance issues
    By Test.File in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 12:54 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