+ Reply to Thread
Results 1 to 6 of 6

Extract Data to New Sheet with Red Color Cell

  1. #1
    Registered User
    Join Date
    02-20-2008
    Posts
    28

    Extract Data to New Sheet with Red Color Cell

    Can a Macro be created that will extract the entire row for a sheet where ever a cell is coloured red to a new sheet.

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Yes

    but you need to say if it is any cell in the row that is red, or is it just in certain columns. The macro will run much quicker if you can be more specific about the range to search.

    Also is the shading the result of conditional formating, or is just shading the cells?

    Regards

    Dav

  3. #3
    Registered User
    Join Date
    02-20-2008
    Posts
    28

    Detail Information

    Hi,

    Sorry for not being specific. Well the red colour will be on a cell which is a result of conditional formatting and I want to extract the entire row from the data where the cell is marked red due to conditional formatting to a new work sheet.

    Thanks a ton in advance.

    Cheers,

    Rahul

  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    You still have not said if the cells are all in one column or the whole sheet?

    Also the conditional format, is it a similar formula in each cell, becasue if it is, it is easier to select the cells on the evaluation of the formula, rather than if the cells are red.

    http://www.vbaexpress.com/kb/getarticle.php?kb_id=190

    will give you some code to get the color of the cells

    can you post the sheet of a sample of it to show what you want to achieve

    Regards

    Dav

  5. #5
    Registered User
    Join Date
    02-20-2008
    Posts
    28

    Clarity

    Dear Dav,

    Pls find the file enclosed for which I need the macro. My aim is that after running the macro where ever the cells have been highlighted due to conditional formatting that particular row gets copied to a new sheet. So at the end I will have a new sheet with all the rows where conditional formatting has taken place.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Well conditional formating is a bit of a pain to do in macros, but as far as I can see you are only concerned if each pair of columns are not equal. And it is coloured green and not red!

    The attached should work. It just compares the values

    Regards

    Dav
    Attached Files Attached Files

+ 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