+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting Cell Colour Based on Another Cells Colour

  1. #1
    Registered User
    Join Date
    11-29-2016
    Location
    Kintore, Scotland
    MS-Off Ver
    Office 2016
    Posts
    9

    Conditional Formatting Cell Colour Based on Another Cells Colour

    Hi folks,

    I'm trying to create a script which automatically formats a cells colour, using another cells colour as the reference. I've attached a sample dataset; in summary:

    Sheet2 shows a list of peoples names in column A, and a cell colour for that person in column B.

    Sheet1 has a range of data, and I would like each cell to be formatted based upon the corresponding cell colour in Sheet2.

    Any help would be greatly appreciated!

    Thanks,,

    Adam
    Attached Files Attached Files

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Try something like this:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    11-29-2016
    Location
    Kintore, Scotland
    MS-Off Ver
    Office 2016
    Posts
    9

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Thanks for your quick reply - very helpful indeed.

    When expanding the range on Sheet1, this formula formats any cells with no content within that range with a white background - do you have any idea why that's happening and how to prevent it?

    Thanks again!

    Adam

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-29-2016
    Location
    Kintore, Scotland
    MS-Off Ver
    Office 2016
    Posts
    9

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Thanks for your help!

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Happy to help.
    Thanks for rep.

  7. #7
    Registered User
    Join Date
    11-29-2016
    Location
    Kintore, Scotland
    MS-Off Ver
    Office 2016
    Posts
    9

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Apologies - hopefully one last question...

    If I deleted the cell text in Sheet1, how can I undo the cell formatting automatically with VBA?

    Thanks

  8. #8
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    So, if we colouring when is not empty, we take a colour off if IS empty:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-29-2016
    Location
    Kintore, Scotland
    MS-Off Ver
    Office 2016
    Posts
    9

    Re: Conditional Formatting Cell Colour Based on Another Cells Colour

    Thanks again - really great support!

+ 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] Conditional formatting based on colour of cells
    By mattdykes in forum Excel General
    Replies: 12
    Last Post: 01-22-2021, 10:55 AM
  2. Replies: 3
    Last Post: 07-18-2019, 11:16 AM
  3. [SOLVED] Sum if cells match a colour based on conditional formatting
    By misterbaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2018, 04:21 AM
  4. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  5. [SOLVED] Search cells based on student name, cell background colour and return a tally for colour
    By drof_06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-26-2016, 04:31 AM
  6. Help doing conditional formatting based on size cell to colour other cells
    By Craigsim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2015, 06:09 AM
  7. [SOLVED] Conditional Formatting (?) based upon another cells colour
    By bellevue in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-09-2012, 04:27 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