Consulting

Results 1 to 6 of 6

Thread: Table format to rows Macro

  1. #1
    VBAX Newbie
    Joined
    Jun 2023
    Posts
    1
    Location

    Table format to rows Macro

    Hi Everyone, My query is there are 6 tabluar forms which i want to convert into rows there are merged cells i dont mind getting blank rows i have pasted 6 like that tables and the required format also is attached

    Thanks in advance
    Attached Files Attached Files
    Last edited by Aussiebear; 06-04-2023 at 12:17 AM. Reason: Edited the single column paste

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,057
    Location
    Welcome to VBAX vsgmpudi. Not sure what happened with your text but it went screwy. I've taken the liberty of fixing it up so it's readable for everyone. Now where to start.... Merged cells, absolutely a problem child for VBA. Are you certain that the layout cannot be constructed without the use of merged cells?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    I don't think the merged cells will cause a problem.

    I just used straight forward formulas

    A simple macro could be used to append forms to the table as new rows
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,057
    Location
    Thank you for a solution Paul, but I ( maybe it's just me), can't feel any vibes from it. The more I look at vsgmpudi's approach here the less I feel comfortable as to where this is going. I strongly believe that this is yet again in improper use of Excel. Since we appear to be simply recording data as opposed to carrying out calculations, a database solution would seem to be more appropriate. Hey, each to our own I guess.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    Quote Originally Posted by Aussiebear View Post
    Thank you for a solution Paul, but I ( maybe it's just me), can't feel any vibes from it. The more I look at vsgmpudi's approach here the less I feel comfortable as to where this is going. I strongly believe that this is yet again in improper use of Excel. Since we appear to be simply recording data as opposed to carrying out calculations, a database solution would seem to be more appropriate. Hey, each to our own I guess.

    Well ... I might be reading too much into OP's #1 ...


    i have pasted 6 like that tables

    .. but I felt like there were 6 source worksheets to go into the summary worksheet, but didn't want to invest much time into a macro based on lack of knowledge

    Merged cells aren't the real issue.

    I'd do a macro that copies each source worksheet's data to the next row on the summary
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  6. #6
    Re: "Merged cells aren't the real issue."
    Maybe not now but I think it is generally frowned upon to use.
    IMHO, we should inform people, after all OP has only his/hers first Post, that that can result in problems in the future.
    As with most things, there are usually ways to get around it but why do that if you don't have to by getting used to not using it at all.
    Sure that Paul & Aussiebear are familiar with these sites but maybe the OP can make up his/her mind if he/she thinks it is needed.

    https://edu.gcfglobal.org/en/excel-tips/why-you-should-avoid-merging-cells/1/
    https://theexcelclub.com/stop-do-not...hy-with-fixes/
    https://www.perfectxl.com/excel-tool...t-merge-cells/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •