+ Reply to Thread
Results 1 to 7 of 7

Macro Help! Copy/Paste Highlighted Row

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2007
    Posts
    67

    Macro Help! Copy/Paste Highlighted Row

    Hey guys,

    I was wondering if someone could help me out with a macro that involves copying and pasting entire rows from 1 sheet to a new sheet. The only rows I want however are the ones that are highlighted (.Interior.ColorIndex = 6).

    Please help. I appreciate the time and effort.
    Last edited by TShelt; 12-16-2011 at 12:31 PM. Reason: Steffen solved.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Macro Help! Copy/Paste Highlighted Row

    Try this

    Please Login or Register  to view this content.
    Last edited by Steffen Thomsen; 12-16-2011 at 12:18 PM. Reason: Updated code
    Please take time to read the forum rules

  3. #3
    Registered User
    Join Date
    10-14-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro Help! Copy/Paste Highlighted Row

    Hi Steffen, thanks for replying - I am testing that out now. Some more info is this -
    The sheet that i will be copying the rows from is named "ResCap"
    The sheet I want to copy the rows to is called "YesMatch"
    Thanks again. Will get back to you ASAP

  4. #4
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Macro Help! Copy/Paste Highlighted Row

    Updated code above!

  5. #5
    Registered User
    Join Date
    10-14-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro Help! Copy/Paste Highlighted Row

    Getting an error with this. Hopefully the info above helps a little more. The rows are also not going to be consecutive. Meaning it could be rows 3, 5, 10, and 18...it will differ. Not sure if that matters.

  6. #6
    Registered User
    Join Date
    10-14-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro Help! Copy/Paste Highlighted Row

    Beautiful. Working great - could you help me add one more thing - I always want Row 1 to be copied over there, preferably first.

  7. #7
    Registered User
    Join Date
    10-14-2011
    Location
    St. Louis, Missouri
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro Help! Copy/Paste Highlighted Row

    Got it - Thanks! Closing out.

+ 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