LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default If cell value equals today

I have used a 3 conditional formats for other things. With vba, I would like
to have a cell fill be red and the font black if the cell equals a date in
cell K7. The range of cells for this possible format is D12:J81

I found some code on the net and tried to modify it to get it to do what I
want ...I made into a disaster.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("D12:J81")
If Application.Cells = Today() Then

..Interior.ColorIndex = 3
Else
..Interior.ColorIndex = 0

End If
End With
End Sub

Thanks for any help

ADK


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Cell with another cell, but only if the date equals today GaryS Excel Worksheet Functions 4 May 1st 08 04:39 AM
how do I do this: today minus hire date equals how many years mo. btaylor1990 Excel Worksheet Functions 1 October 18th 07 08:21 PM
If a cell equals _, at the next row that equals _, return value fr CathyH Excel Worksheet Functions 10 May 2nd 07 07:53 PM
IF TODAY equals date in cell A10, or if TODAY is beyond that date SoupNazi Excel Worksheet Functions 4 April 23rd 07 01:14 AM
If cell is left blank, or equals zero, then cell equals a different cell John McMurry Excel Discussion (Misc queries) 3 April 13th 07 01:14 PM


All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"