+ Reply to Thread
Results 1 to 6 of 6

conditional formating for dates

Hybrid View

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    India
    MS-Off Ver
    Excel 97/2003/2007/2010
    Posts
    67

    Post conditional formating for dates

    hi all,

    ups_date
    11/1/2013 6:00
    11/1/2013 8:00
    11/1/2013 10:00
    11/1/2013 12:00
    11/1/2013 14:00
    11/1/2013 16:00
    11/1/2013 18:00
    11/1/2013 20:00
    11/1/2013 22:00
    11/2/2013 0:00
    11/2/2013 2:00
    11/2/2013 4:00
    11/2/2013 6:00
    11/2/2013 8:00
    11/2/2013 10:00
    11/2/2013 12:00
    11/2/2013 14:00
    11/2/2013 16:00
    11/2/2013 18:00
    11/2/2013 20:00
    11/2/2013 22:00
    11/3/2013 0:00
    11/3/2013 2:00
    11/3/2013 4:00
    11/3/2013 6:00
    11/3/2013 8:00
    11/3/2013 10:00
    11/3/2013 12:00
    11/3/2013 14:00
    11/3/2013 16:00
    11/3/2013 18:00
    11/3/2013 20:00
    11/3/2013 22:00
    11/4/2013 0:00
    11/4/2013 2:00
    11/4/2013 4:00
    11/4/2013 6:00
    11/4/2013 8:00
    11/4/2013 10:00
    11/4/2013 12:00
    11/4/2013 14:00
    11/4/2013 16:00
    11/4/2013 18:00
    11/4/2013 20:00
    11/4/2013 22:00
    11/5/2013 0:00
    11/5/2013 2:00
    11/5/2013 4:00
    11/5/2013 6:00
    11/5/2013 8:00
    11/5/2013 10:00
    11/5/2013 12:00
    11/5/2013 14:00
    11/5/2013 16:00
    11/5/2013 18:00
    11/5/2013 20:00
    11/5/2013 22:00
    11/6/2013 0:00
    11/6/2013 2:00
    11/6/2013 4:00
    11/6/2013 6:00
    11/6/2013 8:00
    11/6/2013 10:00
    11/6/2013 12:00
    11/6/2013 14:00
    11/6/2013 16:00
    11/6/2013 18:00
    11/6/2013 20:00
    11/6/2013 22:00
    11/7/2013 0:00
    11/7/2013 2:00
    11/7/2013 4:00
    11/7/2013 6:00
    11/7/2013 8:00
    11/7/2013 10:00
    11/7/2013 12:00
    11/7/2013 14:00
    11/7/2013 16:00
    11/7/2013 18:00
    11/7/2013 20:00
    11/7/2013 22:00

    i need to highlight every date in different color... time is not a matter,, i want show the individual dates in one color group..

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: conditional formating for dates

    As in your provided dates, days are same, so you can create 12 new rules for the months and set different color for each month.

    After selecting the whole range of dates (Assuming your dates are in col. A and starts from cell A2), create a new rule with the following formula.

    =MONTH($A2)=1
    While using above formula in conditional formatting, you can fill a color of your choice and do it for every month by changing the red colored number 1 to 2,3,4...12 and change the fill color for every month. This is the only way as far as I know.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: conditional formating for dates

    one way of getting just the date without time is:
    =rounddown(date,0)

    Dateserials are stored as XXXXX.XX where the numbers after the decimal place represent the time.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: conditional formating for dates

    One way of doing it - if you want each day of the month to be a different colour:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim c As Range
    For Each c In Target
        If IsDate(c.Value) Then c.Interior.ColorIndex = Day(c) + 2
    Next c
    End Sub
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: conditional formating for dates

    This wont highlight each date a new color, bit it will highlight each time the date changes...

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =INT(A2)>INT(A1) format fill red (or whatever color you want
    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

  6. #6
    Registered User
    Join Date
    07-09-2012
    Location
    India
    MS-Off Ver
    Excel 97/2003/2007/2010
    Posts
    67

    Re: conditional formating for dates

    thanks to all,

    especially for Fdibbins

+ 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. due Dates and Conditional Formating
    By inazone230 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-06-2012, 05:45 PM
  2. Excel 2007 : Conditional Formating using dates
    By kuntz92 in forum Excel General
    Replies: 2
    Last Post: 11-02-2011, 08:31 AM
  3. [SOLVED] Conditional Formating using Dates
    By Will in forum Excel General
    Replies: 15
    Last Post: 07-13-2006, 01:50 PM
  4. conditional formating dates
    By Brockjr38 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 07:10 PM
  5. Install dates formating using conditional formating?
    By Jerry Eggleston in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:49 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