+ Reply to Thread
Results 1 to 8 of 8

How would you change each cell coloured grey in 45 sheets with another colour?

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Bogota
    MS-Off Ver
    Officce 365
    Posts
    54

    Red face How would you change each cell coloured grey in 45 sheets with another colour?

    Hi community!

    I need some help to tackle this issue. I have more than 45 sheets in an excel file where every cell is in grey except for some in white (where users fill in data).

    I was wanting to change this "background colour" but there is no way to do it manually. It would take me lot of days and I would like some different colours to test user experience.

    Do you know any macro that can take a sheet (or many), select grey cells and colour them again?

    Best,
    Gerónimo

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    The CTRL+H Find/Replace tool can do this for you.

    1) Press CTRL+H to open the replace window
    2) Make sure the expanded OPTIONS are visible
    3) Under FIND WHAT, click on Format... drop down and use one of the options provided to correctly select the grey color you're replacing
    4) Under the REPLACE, use the Format... drop down to select your new color
    5) Within: Workbook
    6) Replace All
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    You can use find and replace to search for specific cell fill color.

    In find & replace panel, hit options to expand. Then choose fill format color and search.
    It will list all cells that has specific fill. You then change format to replace with and replace all to do it in one shot.

    You can also set "Within:" property to "Workbook" instead of just the sheet.
    0.JPG

  4. #4
    Registered User
    Join Date
    06-19-2015
    Location
    Bogota
    MS-Off Ver
    Officce 365
    Posts
    54

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    Thanks a lot!

    I tried in one sheet (and I honestly didn't remember the format option in Ctrl-H).

    Unfortunately, I am getting a beautiful "Excel stopped working..." and it closes down. In the repaired version only some got painted =S

    Would you do something else?

    Best,
    Gerónimo

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    Reboot your system. Don't start anything except this one workbook.
    Disable all macros (Developer > Design Mode)

    Now try again, maybe better results.

  6. #6
    Registered User
    Join Date
    06-19-2015
    Location
    Bogota
    MS-Off Ver
    Officce 365
    Posts
    54

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    What do you think about something like this? I still don't know how to set up the colours in vba.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-19-2015
    Location
    Bogota
    MS-Off Ver
    Officce 365
    Posts
    54

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    I finally came up with this. The problem with Ctrl-H is that it has activated the ScreenUpdating. That is why I think that it crashes.

    Many many thanks! What do you think?

    Please Login or Register  to view this content.
    Gerónimo

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: How would you change each cell coloured grey in 45 sheets with another colour?

    See if this works for you...

    Please Login or Register  to view this content.
    Replace the color in blue with the correct gray color you have on the sheets.
    To know the exact gray color number, say you have gray color in the cell A1, then in immediate window type Debug.Print Range("A1").Interior.Color and hit enter, that will give you the exact color number.
    The code will replace all the gray color with Yellow, replace yellow color in the code as per your requirement.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  2. Lock Grey Cells in Range Depending on Seperate Cell change
    By Mackattack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2014, 07:09 AM
  3. colour cell based on other cell and coloured cell value
    By batchjb69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-26-2014, 06:04 PM
  4. [SOLVED] Add brackets if cell colour is grey
    By freud1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2012, 11:00 AM
  5. Coloured Text In Cells Formula So Excel Knows What Colour Is Used & Uses Correct Cell
    By mightymax76 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2010, 09:24 AM
  6. I cannot add fill colour to any cell, or use coloured text
    By julianm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2006, 04:00 PM
  7. [SOLVED] Background colour grey on entire worksheet
    By Re: Inserting an option button in Word in forum Excel General
    Replies: 3
    Last Post: 07-14-2005, 09:05 AM

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