+ Reply to Thread
Results 1 to 2 of 2

Macro to copy a row of data to a different sheet based on a word in a column

  1. #1
    Registered User
    Join Date
    07-22-2012
    Location
    Honolulu, HI
    MS-Off Ver
    Excel 2011
    Posts
    1

    Macro to copy a row of data to a different sheet based on a word in a column

    I have not been successful in finding the right macro in some of the other posts... I am very new to VBA.

    I have a Master sheet with data that I continually update. In Column C I have different hospitals listed (Red, Blue, Green, for example) and I have different sheets for each hospital (Red, Blue, Green). I would like to have a macro that will copy any row that I add to the Master sheet with "Red" in column C to the Red sheet, "Blue" to the Blue sheet, etc...

    Is it easier to simply make three separate buttons (Red, Green, Blue) on the Master sheet which I could click every time I add a line to the Master sheet, which would copy that particular row at the time? Kind of like a "copy row to ***" button.

    Thanks. I'm using Excel 2011 for Mac.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to copy a row of data to a different sheet based on a word in a column

    'SHEET1 TO MANY SHEETS
    Here's a macro for parsing rows of data from one sheet to many sheets named for the same values in a specific column.It not only can parse the rows, it can create the sheets if they are missing. There is a sample sheet there where you can test this out.



    Just edit the macro to use column 3. The MASTER sheet should always have all the relevant data, because each time the macro is run it replaces the content on the subsheets.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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