Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Reading Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Odysseus - 21 Mar 2006 18:00 GMT
Below is a small bit of code that will make a row bold depending on
value in column Q.

I can make it work if the value in Q is text, however I need it to rea
a datevalue. Is there a way to do this?

What I really would like to be able to do (though I was going to tr
and work that one out for myself, small steps) is to make it referanc
two dates in cell user definable cells and bold anything they input
But the first step is to make it read dates..

Any ideas?

Code
-------------------
   
 Sub bold()
 
 Set Rng = Range("Q1:Q5000")
 
 For Each cl In Rng
 If cl.Value = "21/03/06" Then
 cl.EntireRow.Font.bold = True
 
 End If
 Nex
-------------------

Thanks Very much
End Su
Frederick Chow - 21 Mar 2006 19:27 GMT
How about this one?
For Each cl In Rng
 If format(cl.Value, "dd/mm/yy")  = "21/03/06" Then
 cl.EntireRow.Font.bold = True

 End If
Next

Frederick Chow
Hong Kong

> Below is a small bit of code that will make a row bold depending on a
> value in column Q.
[quoted text clipped - 26 lines]
> Thanks Very much
> End Sub
Odysseus - 22 Mar 2006 13:28 GMT
Thanks, that part worked a treat. Though I now need to make the date
varialbe to be enterd into Cell A1. I tried the just sticking in A
that didn't work so I tryied the below, that also didn't work.

Am I on the right track or am I way off here ?

For Each cl In Rng
If Format(cl.Value, "dd/mm/yy") = Format("A1", "dd/mm/yy") Then
cl.EntireRow.Font.bold = Tru
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.