+ Reply to Thread
Results 1 to 5 of 5

How do you copy only those cells conditionally formatted to a certain colour?

  1. #1
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    How do you copy only those cells conditionally formatted to a certain colour?

    I need to copy from one worksheet to another rows where in column B the cells are conditionally formatted to red or blue.

    So one macro would search all of column B and where it finds red or blue cells copy the respective rows they are found in to Sheet2.

    Is this possible using VBA?

    Thanks in advance

    Strud

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How do you copy only those cells conditionally formatted to a certain colour?

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How do you copy only those cells conditionally formatted to a certain colour?

    Thanks for the swift reply John, much appreciated.

    However, I am having some trouble getting that to work.

    It might be because I have column headers on both sheets...

    I have attached an example workbook to show this.....

    any ideas why it wouldn't be working

    Thanks

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

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

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: How do you copy only those cells conditionally formatted to a certain colour?

    Quote Originally Posted by strud View Post
    I need to copy from one worksheet to another rows where in column B the cells are conditionally formatted to red or blue.
    It's a well known issue that you can not evaluate cell color by its Interior property when it is colored via CF.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How do you copy only those cells conditionally formatted to a certain colour?

    Quote Originally Posted by jindon View Post
    It's a well known issue that you can not evaluate cell color by its Interior property when it is colored via CF.
    Thanks Jindon I did not know that about CF- is that just a general limitation of excel?

    The code you gave works perfectly so thanks for that.

    No idea how it works but so long as it does that's the main thing ha!

    Thanks again!

+ 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