+ Reply to Thread
Results 1 to 11 of 11

Aligning rows of multiple tables on the same sheet

  1. #1
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Aligning rows of multiple tables on the same sheet

    I have 3 tables or sets of data that are on the same sheet. The first column in each set of data is the same header and the number can be the same in each set. I would like a way to sort these sets of data so that the rows will line up based on the value in the first column of each set.

    See attached example
    Attached Files Attached Files

  2. #2
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Aligning rows of multiple tables on the same sheet

    Here is a macro to do it.

    Note the 3 named ranges (see attached)

    Please Login or Register  to view this content.
    Let me know if you need further assistance.
    Attached Files Attached Files
    Last edited by Croweater; 08-02-2021 at 11:33 PM.

  3. #3
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Aligning rows of multiple tables on the same sheet

    Thanks for the help. I run the macro but it only seems to space the lines out more, they don't seem to align them. I will look more into the code to see what I can find.

    Thank you again.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Aligning rows of multiple tables on the same sheet

    give this a try - macro on orange button

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  5. #5
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Aligning rows of multiple tables on the same sheet

    Beauty! Thank you!

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,883

    Re: Aligning rows of multiple tables on the same sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Aligning rows of multiple tables on the same sheet

    So I tried running it on my real life tables. My problem now is that the code aligns the "Sku" based by the row number. My sku numbers start at 10000 and go up to 50000. It sounds like the best way is using a macro, I just need to figure out a macro that will handle larger numbers and a lot more data.

    Edit:

    I changed some code around and switched it from + 3 to - 9997. That seems to keep the numbers at the top. Now I am seeing how much data in can process at once without freezing. If this works, I will mark it as solved.
    Last edited by Pmuel; 08-03-2021 at 01:48 PM.

  8. #8
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Aligning rows of multiple tables on the same sheet

    I was going to but when I use this with my real-world example it breaks down. If it is ok, I will leave it up as is and I'll continue to work on a solution myself.

  9. #9
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Aligning rows of multiple tables on the same sheet

    Quote Originally Posted by Pmuel View Post
    Thanks for the help. I run the macro but it only seems to space the lines out more, they don't seem to align them. I will look more into the code to see what I can find.

    Thank you again.
    Funnily enough, what that macro does is, take the example spreadsheet that you provided and creates your desired result as indicated in that original spreadsheet, exactly as per your request.

    Nothing more, nothing less.

    If your real world example is different in any way, you can't expect it to work without at least some minor modification.

  10. #10
    Registered User
    Join Date
    12-10-2020
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    15

    Re: Aligning rows of multiple tables on the same sheet

    this offers no actual help

  11. #11
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Aligning rows of multiple tables on the same sheet

    Well that is exactly what you'll get from me in the future....'no actual help'.

+ 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. Excel VBA add rows to multiple tables in 1 sheet
    By Hoogoo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-01-2020, 11:46 AM
  2. [SOLVED] Aligning Two Tables Rows
    By Fish55 in forum Excel General
    Replies: 9
    Last Post: 01-14-2020, 03:46 PM
  3. Copying multiple rows from tables to another sheet
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-08-2018, 12:55 AM
  4. Aligning data from multiple columns on all rows
    By Shoey5 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-05-2015, 12:49 AM
  5. Aligning rows from multiple columns
    By Sgt Rock in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2013, 01:56 PM
  6. aligning rows to multiple columns
    By jacksage in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 12:03 PM
  7. Help aligning tables rows
    By flethuseo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2011, 08:00 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