+ Reply to Thread
Results 1 to 10 of 10

Resize table based on Cell value

  1. #1
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Resize table based on Cell value

    I am trying to resize a table based on the value entered in a cell. I am using the code below and it works to resize but the number of rows is wrong. It errors if I enter 1 or 2, 3 or 4 sizes it to 1 row, 5 does 2 rows, 6 does three rows and so on - not sure what is going on.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Resize table based on Cell value

    Maybe?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    That gives me a type mismatch error on:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    That gives me a type mismatch error on:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Resize table based on Cell value

    Try:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    Still a type mismatch error.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Resize table based on Cell value

    Try:

    Please Login or Register  to view this content.
    Can you attach your workbook, with some sample data?

  8. #8
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    Here is my excel document that I am working on.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    This code works, but it does not create the correct number of rows:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    04-11-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Resize table based on Cell value

    I was able to get it to work with the code below:

    Please Login or Register  to view this content.

+ 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. [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
  2. Please Help: Resize multiple shapes in the same sheet based on cell value
    By BartekKonopka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2013, 02:27 PM
  3. Resize a shape based on cell value.
    By Environment in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-19-2013, 12:35 PM
  4. [SOLVED] VBA to resize a table based on a cell value
    By Vasool in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2013, 06:10 PM
  5. 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

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