+ Reply to Thread
Results 1 to 6 of 6

Check Background color of cell and write appropriate value in adjacent cell

  1. #1
    Registered User
    Join Date
    03-02-2017
    Location
    India
    MS-Off Ver
    2016
    Posts
    24

    Check Background color of cell and write appropriate value in adjacent cell

    Hi all,

    So, I want the macro to check the background color in Column A jump to the next cell in Column B and write whatever Value is assigned to it..
    so if the background color is yellow i want the next column to say "Bi-monthly" etc.
    You can find the other colors and their value in the top part of the attached file

    I have tried my level best but I don't have exact color.index value for most of the colors so I was trying to use RGB as a reference but failing at that too..

    here is the code so far:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AnirudhC; 04-28-2017 at 06:06 PM.

  2. #2
    Registered User
    Join Date
    03-02-2017
    Location
    India
    MS-Off Ver
    2016
    Posts
    24

    Re: Check Background color of cell and write appropriate value in adjacent cell

    I know the color indexes are wrong after Bi-monthly... I couldn't find the exact color indexes for the color that I want them to be...

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Check Background color of cell and write appropriate value in adjacent cell

    Put this code in your sheet object and when you click on the cell it will display the color index to be used for your code.
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    03-02-2017
    Location
    India
    MS-Off Ver
    2016
    Posts
    24

    Re: Check Background color of cell and write appropriate value in adjacent cell

    Put this code in your sheet object
    Ok I'm going to sound like a complete noob, but how to do this? lol

  5. #5
    Registered User
    Join Date
    03-02-2017
    Location
    India
    MS-Off Ver
    2016
    Posts
    24

    Re: Check Background color of cell and write appropriate value in adjacent cell

    nevermind figured it out!

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Check Background color of cell and write appropriate value in adjacent cell

    K, not to worry...Have a look at this code and attached workbook....Push [Execute] Button
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 8
    Last Post: 04-02-2016, 04:00 AM
  2. Replies: 2
    Last Post: 01-05-2016, 06:36 PM
  3. Swapping cell content to INCLUDE CELL FORMATTING (Text color, background color, etc)
    By jcpeterson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 10:09 AM
  4. 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
  5. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  6. Replies: 4
    Last Post: 12-29-2013, 11:41 PM
  7. Add a background color to a cell depending on what you write
    By ady_alternative in forum Excel General
    Replies: 2
    Last Post: 02-17-2010, 09:04 AM

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