+ Reply to Thread
Results 1 to 4 of 4

Changing color of cells based on color of other cells without changing the content of cell

  1. #1
    Registered User
    Join Date
    08-15-2014
    Location
    Jacksonville, USA
    MS-Off Ver
    XP
    Posts
    2

    Question Changing color of cells based on color of other cells without changing the content of cell

    Hello,

    I have Windows XP, and I need help with a macro to do the following without changing the content of any cell....

    IF any cell C3 through P3 is RED, THEN make cells A3 and B3 RED.
    Else, IF any cell C3 through P3 is ORANGE, THEN make cells A3 and B3 ORANGE.
    Else, IF any cell C3 through P3 is YELLOW, THEN make cells A3 and B3 YELLOW.
    Else, leave cell WHITE.

    This would be applied to all the other cells in the same column...

    Thank you for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Changing color of cells based on color of other cells without changing the content of

    Why not just copy C3 and select A3:B3 and pastespecial-format
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Changing color of cells based on color of other cells without changing the content of

    Hi, MiloG,

    you should attach a sample workbook to have a look at how the data in the range is changed (Formula or Values) and how the colour is applied (by hand or by use of Conditional Formatting).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    08-15-2014
    Location
    Jacksonville, USA
    MS-Off Ver
    XP
    Posts
    2

    Re: Changing color of cells based on color of other cells without changing the content of

    Here you go... On this particular one, if cells C-L are (RED, ORANGE, YELLOW), make cells A-B in that color as well (in that order). Red has the highest priority, then orange, then yellow....

    Keep in mind that I have older version (2003) of excel. I may not be able to do see/do what you suggest.
    Attached Files Attached Files
    Last edited by MiloG; 08-18-2014 at 10:17 AM.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Changing color of cells based on color of other cells without changing the content of

    Hi, MiloG,

    too many Conditional Formattings to evaluate in the given range for me I´m afraid to program. I suggest to use a helper row and display 1 for Red, 2 for Orange, 3 for Yellow for each cell in question and it´s CF and use CountIf for the Conditional Formatting for A3 and B3 on that helper row.

    Ciao,
    Holger

+ 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. changing the color of a cell based on content
    By trisham in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-26-2013, 04:26 PM
  2. [SOLVED] Conditional Formatting (changing color) in one cell based on text in two cells
    By Chadyoung1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-14-2013, 04:26 AM
  3. Changing all blue color numbers/texts to black color in cells...
    By dhyun3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-05-2012, 10:17 AM
  4. Replies: 2
    Last Post: 05-27-2010, 05:29 AM
  5. Replies: 0
    Last Post: 07-17-2007, 03:23 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