+ Reply to Thread
Results 1 to 5 of 5

Change colour of every cell in workbook that matches RGB index

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    64

    Change colour of every cell in workbook that matches RGB index

    Hello everyone

    After spending some time developing a series of models for various business users, one of my colleagues has now advised me that the RGB index I've been using in every model is in fact slightly different to what it should be (our marketing is very strict on the exact colours we use).

    I'm trying to code a solution to this in VBA but failing. So the question is, I need a sub that will loop through every cell on every worksheet in a given workbook, and if the cell interior colour matches the RGB index in question, it changes the interior colour to a different RGB index.

    If anyone can show me how to do this I will be incredibly grateful

    Many thanks
    Bonnister

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Change colour of every cell in workbook that matches RGB index

    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Change colour of every cell in workbook that matches RGB index

    What index do you want to identify and what index do you want to change it to?

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Change colour of every cell in workbook that matches RGB index

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-01-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Change colour of every cell in workbook that matches RGB index

    Norie, Stnkynts,ragulduy

    Thanks to you all for your input, I went for the first one and Norie, it works perfectly. I'd got the cell.interior coding and the for...next loop, just seemed to have problems with the dims and usedrange.

    Thanks again everyone

    Bonnister

+ 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. [SOLVED] INDEX MATCH array formula that matches substring n gives multiple matches
    By bkwins in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 04:57 AM
  2. Replies: 4
    Last Post: 07-18-2012, 02:34 PM
  3. Replies: 2
    Last Post: 06-07-2011, 07:00 AM
  4. Colour change column chart based on cell colour
    By Alice21 in forum Excel General
    Replies: 11
    Last Post: 04-05-2011, 10:10 AM
  5. Change Event to change Font to bold and colour Index
    By Wskip49 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-21-2008, 02:38 PM

Tags for this Thread

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