+ Reply to Thread
Results 1 to 12 of 12

Can you have more than 1 macro in a spreadsheet?

  1. #1
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Can you have more than 1 macro in a spreadsheet?

    Hi,
    Is it possible to have more than 1 macro in a spreadsheet?
    Here's what i want.. (please see spreadsheet attached)

    1) I want to have 2 buttons on the on the black tab.
    a) One that pastes info from the yellow tab (paste columns C through N) on to the report on the black tab.
    b) the other to paste info from the purple tab (paste columns A through L and P through R) on to the report on the black tab.

    Can you please help me do this? Thank you.

    CB
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Can you have more than 1 macro in a spreadsheet?

    Hi

    You can have literally hundreds of Macros an a spreadsheet.
    When you start using Userforms you will find out what I mean.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 10-09-2015 at 02:27 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you have more than 1 macro in a spreadsheet?

    So when we copy from these tabs to the black tab they will be filtered?
    The black tab will be empty when this process starts?
    If the black tab is not empty when the process starts which column will always have data, since we need to determine the last row with data so that the new data will be pasted below this row.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  4. #4
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Re: Can you have more than 1 macro in a spreadsheet?

    thanks for getting back to me so quickly skywriter..
    To answer your inquiries above...
    Yes, i want to be able to filter if possible.
    When the process starts the black tab will be empty. And then when i press the appropriate button(s) then they populate from the black and purple respectively.
    Thanks for helping.

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you have more than 1 macro in a spreadsheet?

    Your header names are not necessarily the same on all these sheets, so please verify which data goes where on the Invoice Audit sheet.

    In other words Renewal Report columns C through N goes to columns X through X on the Invoice Audit sheet etc. Do this for all data you want copied. I have most of the code written but it's not obvious to me where you want to copy to.

  6. #6
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Re: Can you have more than 1 macro in a spreadsheet?

    My apologies skywriter..
    Here you go...

    Renewal Report columns C through N goes to columns A through L on the Invoice Audit sheet.

    Transactional Report columns A through L goes to columns A through L on the Invoice Audit sheet.
    Transactional Report columns P through R goes to columns M through O on the Invoice Audit sheet.

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you have more than 1 macro in a spreadsheet?

    Here's the code and the sample file with the code installed.
    Test it and let me know if there are any issues.

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

  8. #8
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Re: Can you have more than 1 macro in a spreadsheet?

    SOLVED this is just perfect!!
    A billion thanks skywriter, you ROCK!!
    Everyone, if you want quick accurate answers, reach out to skywriter.

  9. #9
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you have more than 1 macro in a spreadsheet?

    You're welcome.

    Please click the Thread Tools drop down box above your first post and choose solved.

  10. #10
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Re: Can you have more than 1 macro in a spreadsheet?

    One last thing skywriter,
    Is there anyway to have the button on the invoice tab, copy the info from the renewal report tab, that only shows the items confirmed (in green)? see new attachment added here. Please and thanks.
    Attached Files Attached Files

  11. #11
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Can you have more than 1 macro in a spreadsheet?

    So these green cells are only green because you colored them green or is there something different about them? Maybe the status column?

    I forgot to make the code work with filters, so I changed it.
    If you can filter your sheet because of something like the status column to get those green cells by themselves, then this code should take care of that.


    Please Login or Register  to view this content.
    Last edited by skywriter; 10-09-2015 at 06:16 PM.

  12. #12
    Registered User
    Join Date
    07-20-2015
    Location
    NYC
    MS-Off Ver
    2010
    Posts
    70

    Re: Can you have more than 1 macro in a spreadsheet?

    The green rows are the "confirmed" rows. Those are the ones that need to be copied to the black tab.

+ 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. [SOLVED] Run macro from another spreadsheet?
    By karmadog62 in forum Excel General
    Replies: 4
    Last Post: 09-18-2014, 11:26 AM
  2. Replies: 0
    Last Post: 05-19-2014, 04:16 PM
  3. Macro to Export Data from one spreadsheet to a Report Spreadsheet
    By stockgoblin42 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-11-2013, 03:59 PM
  4. Macro search one spreadsheet replaces in another spreadsheet
    By sarahhe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-30-2011, 09:15 PM
  5. Spreadsheet Macro
    By Kristin from NYS in forum Excel General
    Replies: 1
    Last Post: 05-05-2006, 03:00 PM
  6. is it possible to add a MACRO to a Spreadsheet from VB app??
    By Simon in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 06-29-2005, 01:05 PM
  7. Replies: 1
    Last Post: 02-08-2005, 06:06 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