+ Reply to Thread
Results 1 to 6 of 6

Select cells by colorindex

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Select cells by colorindex

    Hello all,

    I'd like to write a macro that selects all cells with a certain background. The color I'm looking for is (255,217,102). I want to select all cells in the sheet with this background color, and then change the value of these cells. I'm fairly certain this can be done, but I've never been great with VBA. This is what I'm trying so far:

    Please Login or Register  to view this content.
    0 is not the actual value I want but I've been using it to test.
    Can someone please help me?
    Last edited by JBeaucaire; 02-12-2013 at 11:40 AM. Reason: Added code tags, as per forum rules. Don't forget!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Select cells by colorindex

    you can filter on cell colour
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-11-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Select cells by colorindex

    I can't get the filter to work because of merged cells...any way to do this with a macro?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Select cells by colorindex

    rule 1 don't merge cells
    rule 2 see rule 1

  5. #5
    Registered User
    Join Date
    02-11-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Select cells by colorindex

    Someday I'll be my own boss and not merge any cells.

    In the meantime, can anyone help me.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Select cells by colorindex

    untested
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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