+ Reply to Thread
Results 1 to 7 of 7

Macro to select table data

  1. #1
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Jacksonville, Fl
    MS-Off Ver
    Excel 2016
    Posts
    355

    Macro to select table data

    Hello,

    I'm trying to create a macro and have had no success at all. I need the macro to select all data from all the tables on a worksheet (not including the headings). The tables are all kept seperate and are spread apart. I then need to copy and paste this data on a different worksheet in the first empty cell but I need the data all on top of each other. I attached a very simple example of the tables on sheet 1 and what i would like the macro to do on sheet 2. I've been working on this for a day now and have not even came close. Granted I am new to VBA but am getting very fustraded in my poor attempt to write my own code so i'm trying a differnt approach and starting over. I'm still trying to learn so if anyone can help me at all or even get me started it would be very appricated! I'm a quik learner i'm just completly lost on this one.

    Thank you in advance to anyone willing to look at my problem...

    Regards, Justair
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro to select table data

    Hi Justair07,
    try this
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Jacksonville, Fl
    MS-Off Ver
    Excel 2016
    Posts
    355

    Re: Macro to select table data

    Perfect! You are a geinus! I have a lot to learn thank you for the help nilem!

  4. #4
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Jacksonville, Fl
    MS-Off Ver
    Excel 2016
    Posts
    355

    Re: Macro to select table data

    Do you know if it's possible to do a Special Paste so that way none of the formating or if i'm getting the value from a formula only the value will be pasted in sheet 2? Not any of the extra stuff.

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro to select table data

    try
    Please Login or Register  to view this content.

  6. #6
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Macro to select table data

    Please Login or Register  to view this content.
    You can align the values to ignore the formatting. This seems to work (note, also added in a clearContents line to remove previous runs. If you run this on the sheet you already have used the macro on, remove the formatting from sheet2 before running this (otherwise it will remain in place even though the values are copied).

    edit---
    sorry, didn't see nilem's second reply
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  7. #7
    Forum Contributor
    Join Date
    01-08-2013
    Location
    Jacksonville, Fl
    MS-Off Ver
    Excel 2016
    Posts
    355

    Re: Macro to select table data

    nilem, you have done it again! thank you!! and i promise i am learning! GeneralDisarray, thank you as well for your response!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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