+ Reply to Thread
Results 1 to 3 of 3

Copy a row from one sheet to another based on the color of a cell

  1. #1
    Registered User
    Join Date
    11-11-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2007/2010
    Posts
    9

    Copy a row from one sheet to another based on the color of a cell

    I am hoping I dont have to go into some huge long vba or macro coding to do this. I just need a simple way to say "Hey- this row has a red highlighted cell, so copy that row into the other sheet until it is no longer red"
    I have seen tons of code, but nothing has worked for me.
    So I have one sheet titled "ST Audit history", and the other titled "Tracking". In the ST Audit history, in colum G starting in row 3 and going down, I have dates that are expired and highlighted in red. I would like the whole row to be copied over to the "Tracking" sheet. If the cell is no longer red in the audit sheet, then i want it to disappear from the tracking sheet. Any ideas? Maybe an "if, then," formula?
    Thanks to anyone who can make this simple for me

  2. #2
    Registered User
    Join Date
    11-11-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2007/2010
    Posts
    9

    Re: Copy a row from one sheet to another based on the color of a cell


    I was able to get this code to work for 1 row, but I need it to work for all rows from row 3 down. I also need it to disappear once the cell is no longer red, but right now it stays there and the cell just takes the red highlight away. Any help is greatly appreciated

    Private Sub Worksheet_Activate()
    Cells.Clear
    Sheets("ST Audit history").Rows(3).Copy Destination:=Rows(2)
    For N = 2 To Sheets("ST Audit history").UsedRange.Rows.Count
    If Sheets("ST Audit history").Cells(N, 6).Interior.ColorIndex = 3 Then
    Sheets("ST Audit history").Rows(N).Copy Destination:=Rows(UsedRange.Rows.Count + 1)
    End If
    Next N
    End Sub

  3. #3
    Registered User
    Join Date
    11-11-2011
    Location
    Phoenix
    MS-Off Ver
    Excel 2007/2010
    Posts
    9

    Unhappy Re: Copy a row from one sheet to another based on the color of a cell

    Any help please? Should I repost this in the VBA forum?

+ 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. Copy entire row to another sheet based on cell color
    By Marco-Kun in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-18-2013, 09:13 AM
  2. [SOLVED] Copy a row to another sheet based on cell fill color
    By swatkins1977 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2012, 02:55 PM
  3. Replies: 0
    Last Post: 06-15-2012, 04:15 PM
  4. [SOLVED] How can I change sheet tab color based on cell value in sheet?
    By SCAScot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2005, 05:50 PM
  5. copy and paste to another sheet based in cell color
    By nat3ten in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2005, 07:05 PM

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