+ Reply to Thread
Results 1 to 6 of 6

Color column range based on content in fixed cell

  1. #1
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Color column range based on content in fixed cell

    I have an excel sheet (excel 2003) and it contains data as follows:
    a) column A contains name
    b) column B contains IDs
    c) C1: date, C2=weekday based on date, C3: For each of the corresponding name, it contains some plain text (basically work activity, like Project1, Meeting, Leave etc)
    c) repeat "C" format for all subsequent columns.

    There are a total of about 50 names (column A) and hence 50 corresponding IDs (column B) and so on.

    Now, I require the following:
    a) If the day is "Saturday" (it will be in C2), then color the column from C3:C50 in GREY color (or any other color)
    b) If the day is "Sunday" (it will be in C2), then color the column from C3:C50 in GREY color (or any other color)
    c) all other weekdays, needs to be colored blue.

    I will keep adding columns every day and the above formatting should apply.

    Hope someone helps me.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Color column range based on content in fixed cell

    That's what Conditional Formatting is for, you don't need VBA

    http://excel-it.com/excel_conditional_formatting.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Color column range based on content in fixed cell

    Thanks for the prompt reply.

    At the risk of offending seniors here, I would like to know how to do it using VB?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Color column range based on content in fixed cell

    Why/ An inbuilt Excel Tool is more efficient than trying to recreate it with VBA, in addition you don't have the hassle of educating users to enable macros

  5. #5
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Color column range based on content in fixed cell

    How to do it using condutional formatting?

  6. #6
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Color column range based on content in fixed cell

    Quote Originally Posted by xxxyyyy View Post
    How to do it using condutional formatting?
    I figured it out now using CF.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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