+ Reply to Thread
Results 1 to 5 of 5

red or blue

  1. #1
    Registered User
    Join Date
    05-11-2016
    Location
    new zealand
    MS-Off Ver
    ms 2013
    Posts
    16

    red or blue

    Hi,

    Could you please tell me that how can I create a new cell with today's date and program it so that, if the day is an even number it displays in red, otherwise in blue?

    Thanks

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: red or blue

    Hi,

    To get today's date in a cell you can use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To format this as red and blue you can use two conditional formats.
    To do this you need to go to conditional formatting > new rule > use a formula to determine which cells to format.
    Use the format selection to choose the red and blue colours and then use these formulas (A1 is the cell that I used but you can change this):
    Red:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Blue:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Registered User
    Join Date
    05-11-2016
    Location
    new zealand
    MS-Off Ver
    ms 2013
    Posts
    16

    Re: red or blue

    It worked.

    Thanks

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,771

    Re: red or blue

    =NOT(ISEVEN(DAY(A1)))
    One function can be avoided if we use IsOdd()

    =ISODD(DAY(A1))

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,110

    Re: red or blue

    Also, if you give the cell regular formatting for 1 of those colors, you only need 1 CF rule for the other color
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Conditional Format to Blue Fill and Blue Font IF two conditions are met
    By Branbran10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2015, 10:52 AM
  2. Macros Won't Run...Out of the Blue
    By BLS99covert in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2014, 04:10 PM
  3. Hello from where the Skies are so blue
    By hawkinsse6543 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 05-02-2014, 04:50 AM
  4. Turn cell A1 blue if any cells between $L$6:$Q$9 are blue
    By sandk0330 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2013, 02:53 PM
  5. Count number of cells that contain red, blue or red and blue
    By kjshearon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-17-2013, 11:26 AM
  6. Excel 2007 : Blue line
    By Ben Lester in forum Excel General
    Replies: 6
    Last Post: 07-27-2010, 06:38 AM
  7. Blue moon
    By Chuck in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2005, 11:20 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