Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading Dates


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

--
Odysseu
-----------------------------------------------------------------------
Odysseus's Profile: http://www.excelforum.com/member.php...fo&userid=1456
View this thread: http://www.excelforum.com/showthread.php?threadid=52486

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Reading Dates

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
"Odysseus" wrote in
message ...

Below is a small bit of code that will make a row bold depending on a
value in column Q.

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

What I really would like to be able to do (though I was going to try
and work that one out for myself, small steps) is to make it referance
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
Next
--------------------



Thanks Very much
End Sub


--
Odysseus
------------------------------------------------------------------------
Odysseus's Profile:
http://www.excelforum.com/member.php...o&userid=14563
View this thread: http://www.excelforum.com/showthread...hreadid=524866



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading Dates


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

--
Odysseu
-----------------------------------------------------------------------
Odysseus's Profile: http://www.excelforum.com/member.php...fo&userid=1456
View this thread: http://www.excelforum.com/showthread.php?threadid=52486

Reply
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
Copnvert dates reading as Text to a date format Margy Excel Discussion (Misc queries) 5 February 9th 09 06:53 PM
reading from SQL Texas Tonie[_2_] Excel Discussion (Misc queries) 0 November 9th 07 10:59 PM
Reading dates from text file Chris Mahoney Excel Programming 12 February 9th 05 02:11 AM
reading/inserting variable dates within a macro Dan Wasser Excel Programming 7 January 8th 04 01:21 PM
sub for reading Fernando Duran Excel Programming 4 September 15th 03 07:52 PM


All times are GMT +1. The time now is 08:18 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"