+ Reply to Thread
Results 1 to 8 of 8

Change cell color to match the color of another cell in its row

Hybrid View

  1. #1
    Registered User
    Join Date
    09-27-2017
    Location
    Baltimore
    MS-Off Ver
    Office for Mac
    Posts
    35

    Change cell color to match the color of another cell in its row

    I am using a sheet to track contracts. Each contract is its own row with info about it organized in columns (effective date, expiration date, signer, etc.). If there is something of major concern about a contract, I color the corresponding cell red (for example - if a contract has expired or if it's missing a signature) but if there is an issue but it is not as major, I color the cell orange.

    I want there to be a way to indicate in the first column (which is the counterparty name column) that one of the cells in its row is colored red or orange - by having the cell in the first column become red if there is a red cell in its row and orange if there's an orange cell in its row. Can I do this with conditional formatting? What's the simplest way to do this?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,780

    Re: Change cell color to match the color of another cell in its row

    The only way to do this is with a macro. If you can attach your file to demonstrate the format, with some sample data (but you should probably use fake data), I can help.

    What happens if the same row has a red and an orange?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-27-2017
    Location
    Baltimore
    MS-Off Ver
    Office for Mac
    Posts
    35

    Re: Change cell color to match the color of another cell in its row

    If both colors are in a row, it should be red - i.e. the color of the biggest issue in that row.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,780

    Re: Change cell color to match the color of another cell in its row

    Perhaps you missed the line where I asked you to attach a sample file.

  5. #5
    Registered User
    Join Date
    09-27-2017
    Location
    Baltimore
    MS-Off Ver
    Office for Mac
    Posts
    35

    Re: Change cell color to match the color of another cell in its row

    Has the file I attached helped?

  6. #6
    Registered User
    Join Date
    09-27-2017
    Location
    Baltimore
    MS-Off Ver
    Office for Mac
    Posts
    35

    Re: Change cell color to match the color of another cell in its row

    I am unsure how to attach a file. Hope this works
    Attached Files Attached Files

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,780

    Re: Change cell color to match the color of another cell in its row

    Your cells are colored in a combination of conditional formatting and permanent formatting. This uses a UDF along with conditional formatting. The UDF returns a string that tells you the highest priority shading in a range (High for red, Medium for orange) and then conditional formatting sets the fill color based on that.

    Format changes do not cause a VBA event so the function is Volatile. It will update whenever there is a change to data. If you are changing formatting but not data you can force a formatting update by double clicking a cell and then hitting ENTER.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-27-2017
    Location
    Baltimore
    MS-Off Ver
    Office for Mac
    Posts
    35

    Re: Change cell color to match the color of another cell in its row

    thanks!

    greatly appreciate it

+ 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] Color changing: change the color of one cell, and have other cells change colors too
    By hadydea in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2019, 04:51 PM
  2. Change cell format (cell color+font color) based on color of another cell
    By Dedaluss in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2017, 03:27 AM
  3. Change a Range's cell background color to that of another cell's cond. format color
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2014, 12:57 PM
  4. [SOLVED] Change cell color depending on cell color, error in code
    By mushedpotatos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2014, 04:20 AM
  5. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  6. Replies: 12
    Last Post: 09-18-2012, 03:13 PM
  7. Replies: 5
    Last Post: 05-10-2012, 10:49 PM

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