+ Reply to Thread
Results 1 to 5 of 5

How to Colour Column based on Cell value

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    91

    How to Colour Column based on Cell value

    friends,

    Can anybody provide me a macro to colour columns in a worksheet based on a cell in that particular column?

    ie,

    I have a worksheet having datas and It is having columns from F to AJ. What I need is If any of the columns 7th row is " SUNDAY", I need that columns 8th raw to 500th raw should in Red colour. Ie if F7= SUNDAY, F8:F500 should be in Red colour.
    Also If any of the columns 7th row is " SATURDAY", I need that columns 8th raw to 500th raw should in Yellow colour. Ie if F7= SATURDAY, F8:F500 should be in YELLOW colour.
    Also, If any of the columns 7th row is " MONDAY", I need that columns 8th raw to 500th raw should in GREEN colour. Ie if F7= MONDAY, F8:F500 should be in GREEN colour.

    Kindly help me with a macro for this

  2. #2
    Registered User
    Join Date
    12-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: How to Colour Column based on Cell value

    Or simply like,

    If F7= TODAY() & SUNDAY, F8:F500 = RED
    If F7=TODAY() & MONDAY, F8:F500 = GREEN
    If F7=TODAY() & SATURDAY, F8:F500 = YELLOW

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How to Colour Column based on Cell value

    What about TUESDAY, WEDNESDAY, THURSDAY and FRIDAY?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    12-04-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: How to Colour Column based on Cell value

    Sir, It should be in normal colour.

  5. #5
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: How to Colour Column based on Cell value

    Hi aneshdas, will you consider using Conditional Formatting instead of macro?

+ 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. Change colour of cells based on another cell's colour (Not value)
    By LTrain89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2013, 08:44 PM
  2. Insert/Update particular column based on background colour of another column
    By onenessboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2012, 03:28 AM
  3. macro needed: change cell colour based on input in another column
    By weesteev in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-23-2012, 02:47 PM
  4. Colour change column chart based on cell colour
    By Alice21 in forum Excel General
    Replies: 11
    Last Post: 04-05-2011, 10:10 AM
  5. Filtering a column based on cell colour...
    By Finalfrontier1976 in forum Excel General
    Replies: 3
    Last Post: 03-27-2010, 11:02 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