+ Reply to Thread
Results 1 to 4 of 4

How to make a dynamic range with multiple tables on sheet?

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    How to make a dynamic range with multiple tables on sheet?

    Hi guys,

    I want to make a dynamic range. I've found plenty of suggestions on the internet that use the offset function, and do things like count the number of non-blank cells in a column to get the the height of the dynamic range. The problem I have is that I have multiple tables on the same sheet, separated by blank cells, like this:

    ExcelExample.png

    I want to have two dynamic ranges. One for the first table named PureGasProperties, one for the second name MixtureProperties. If I use the count or counta function as many articles have suggested, it will count the non-blank cells in both tables rather than just the one I am interested in. What is the best way to count just the number of cells until the FIRST blank row? I have had a surprisingly difficult time finding an answer to this! I am hoping that a macros is not necessary and it can be done with excel function

    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,509

    Re: How to make a dynamic range with multiple tables on sheet?

    Don't put them under each other, put them alongside each other with a blank column separating them.

    Then you can use the techniques you have read about.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-29-2015
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: How to make a dynamic range with multiple tables on sheet?

    Hi TMS, this would be valid in my example. I am hoping for something more robust, however. It is possible, for example, that I might want to add columns as well as rows at some point, and I would want some technique that would add these columns to the range as well. I might want to add the density or the viscosity as additional properties of the gases in addition to molecular weight, or I might want to add the composition of the mixtures. If the tables were placed next to each other I'd run into the same problem when I try to add columns dynamically. Apologies for not explaining this in the OP.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,509

    Re: How to make a dynamic range with multiple tables on sheet?

    If you add columns, the chances are the range will adjust anyway, or you'd need to change your formulae (say, VLOOKUP). I think it is more important to have a robust mechanism for managing rows.

    Best bet is probably two Structured Tables side by side separated by a blank column.

+ 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. I want to make a macro to bring tables from another sheet to cover sheet
    By nthomas901 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2014, 09:38 AM
  2. Replies: 4
    Last Post: 08-16-2013, 05:45 PM
  3. How to create macro to sort multiple tables in dynamic range?
    By munnie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2013, 09:57 PM
  4. [SOLVED] Dynamic table in a different sheet from multiple tables in other sheet
    By David Brown in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-27-2013, 12:22 AM
  5. SOLVED Dynamic Range Tables
    By vchibisov in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 10-15-2012, 11:18 AM

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