+ Reply to Thread
Results 1 to 3 of 3

Cell colors

  1. #1
    Registered User
    Join Date
    02-01-2025
    Location
    Macedonia
    MS-Off Ver
    2016
    Posts
    6

    Cell colors

    Hello
    I am using office 2016
    I have one column I have data marked with cell colors (yellow, orange ... etc) or style (bad, good..... etc).

    I need in second column to add next to each cell, text like cell color from the first column.
    Text in second column will be like (YELLOW, ORANGE, BAD, GOOD, etc)

    Is this possible with some formula because my first column is very long and has more colors and styles.
    Last edited by kocevskii; 03-08-2025 at 12:35 PM.

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2501
    Posts
    1,431

    Re: Cell colors

    I think a VBA solution would be best for this situation as formula can't get the colour nor style from the cell.

    The VBA solution could be a subroutine that does it all at once or a custom function that works similar to a formula but is created manually using VBA.

    I think a good start here would be an example workbook with an example of each colour/ style that would be used along with the word you would like to see beside it.
    If things don't change they stay the same

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,475

    Re: Cell colors

    this is the VBA custom function i use for cell color.

    Please Login or Register  to view this content.
    =cellcolor(A1) Replace A1 with the cell that has the color

    This will get you the number of the color (1-56) of the referenced cell based on this color graph: https://learn.microsoft.com/en-us/of...cel.colorindex

    then just do an if statement or lookup to change 6 to Yellow or 4 to Green...etc
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

+ 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. Graph Colors to match cell colors
    By hadoan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2019, 02:11 AM
  2. [SOLVED] VBA code to change Excel chart bar colors as per cell colors
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2016, 03:29 AM
  3. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  4. Replies: 3
    Last Post: 10-21-2015, 03:51 PM
  5. Replies: 16
    Last Post: 12-12-2014, 06:19 AM
  6. Replies: 1
    Last Post: 08-01-2014, 10:33 AM
  7. [SOLVED] Can't format font colors or cell fill-in colors
    By canoeron in forum Excel General
    Replies: 3
    Last Post: 08-22-2005, 07:05 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