+ Reply to Thread
Results 1 to 9 of 9

Auto-Creating Tables from raw data?

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Auto-Creating Tables from raw data?

    Hi there,

    I'm incredibly lazy and have a set of data on users interactions with various materials. What I want to do, if possible, is have a data set pasted into the spreadsheet, which then populates different tables. See the attached file to make things clearer.

    The tables would have a list of names in them, as well as the figure for that data set (gold, iron etc) HOWEVER: I want excel to NOT put in names into a particular table if that particular name has 0 interactions with the material. So I cant use a vlookup, can anyone advise on how to do this?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Auto-Creating Tables from raw data?

    Do you want the data on the Diamond Data worksheet cleared everytime you insert new Temp_Data or add the new data to the existing data?

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Auto-Creating Tables from raw data?

    Yes its new data on the nice looking sheet every time i paste data into the other sheet.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Auto-Creating Tables from raw data?

    Sorry LOL so overwrite the existing data on the nice looking sheet?

  5. #5
    Registered User
    Join Date
    07-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Auto-Creating Tables from raw data?

    Yes ideally it would over write it, but i can delete the data on the nice looking sheet each time i do the report if required.

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Auto-Creating Tables from raw data?

    Alrighty,

    I've attached your original workbook. It now includes two macros that are dependent upon eachother.
    The first is the FormatReport macro which runs the ResetReport macro and then populates the Materials Report. The other is the Reset Report macro which clears the existing report on the first worksheet in the workbook.

    To run the code, make sure to enable macros when opening the workbook. Then select the Populate Report button at the top left of the Diamond Data worksheet.

    To view the code Press Alt+F8 and then select the FormatReport macro, select the Step Into option.
    Visual Basic will open and show you the coding for both macros. Anything that appears in green is a comment meant to help you understand the code so that you may alter it to fit your workbook.

    Let me know if you have any questions!

    Thanks!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Auto-Creating Tables from raw data?

    HI there,

    Thanks for the reply, Macro is one area where my knowledge really is lacking. I am trying to get this to work but cannot figure out how to run it. I've changed my macro secureity, but when i click the button it just makes "resize pegs" appear at the corners, as if i was editing the actual button. Doubleclicking opens visual basic script, and righ-clicking on the button doesnt make any "run macro" open appear. Please advise??

  8. #8
    Registered User
    Join Date
    07-12-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Auto-Creating Tables from raw data?

    Never Mind i have figured that out now (just needed to restart after changing security options). I have a few questions, though. It seems that, wonderful as this is, it destroys the % formulas on the "diamond data" page, is there any way to prevent this? Also, theres a lot of hidden rows on the "temp_data" page that I cant unhide?

  9. #9
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Auto-Creating Tables from raw data?

    Hello there,

    Also, theres a lot of hidden rows on the "temp_data" page that I cant unhide?
    Add the following line of code:

    Please Login or Register  to view this content.
    Before the end sub and last line of code, so that the entire code look like so:

    Please Login or Register  to view this content.
    As for the formula what was the formula in the percentage column supposed to be?

    Thanks!

+ 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