+ Reply to Thread
Results 1 to 6 of 6

macro creates new sheet with data from other sheets

  1. #1
    Registered User
    Join Date
    02-07-2011
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unhappy macro creates new sheet with data from other sheets

    Hi Everyone,

    Could really use the help/pointers on an issue I'm having major difficulty with. This is my first post and I believe I'm a little over my head. The premise for my problem is easy enough: I have 4 tabs that are created via SQL (could be more or less than 4 tabs, depending on the customer) and I need a macro that generates a new tab and fills it in with aggregate data from the other sheets.

    Attached is my file with a sample of data and the hypothetical template created. My main issues are:

    - How do I make the macro move from one sheet to the next one once it recognizes the row is blank?
    - On the template, I need to have the rows for the varieties numbered (Column A), but I cannot figure out how do to it as such.
    - The 4th tab name begins with "expired". I need the macro to disregard these sheets (there can be more than one, but they're always at the end of the workbook).

    This is my first foray into VBA and when given the task it seemed easy enough. I had taken a little bit of Java/C++ in college and was fairly good at excel basics, but I have no idea how to approach.

    Any help or guidance, believe me, is GREATLY appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-07-2011
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: macro creates new sheet with data from other sheets

    anyone able to lend a hand?

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,946

    Re: macro creates new sheet with data from other sheets

    Please note that I had to reformat your data/fruit sheets in order to make my macro easier....
    Attached Files Attached Files
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    02-07-2011
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: macro creates new sheet with data from other sheets

    Thank you so much! This works really well. Appreciate the time and work you put into it.

    My final question is: The values for column A on your macro-created report sheet are a series of numbers starting at 1.

    Please Login or Register  to view this content.
    How would you go about resetting the count once there is a new fruit listed in column B as I listed in my original sheet?

    Either way, THANK YOU! THANK YOU SO MUCH!!

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,946

    Re: macro creates new sheet with data from other sheets

    Please replace the single line:
    Please Login or Register  to view this content.
    With;
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-07-2011
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: macro creates new sheet with data from other sheets

    i cannot thank you enough for the help. have a great weekend!

+ 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