View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Find Today's Date in a List-- How?

This little macro will search Column C for today's date and copy A1 to the
cell to the right of today's date .
Note that the code is getting today's date from the system date of your
computer so make sure you have the right date set in your computer. Note
that there is no error trap in this macro so you must have today's date
listed in Column C. HTH Otto
Sub FindDate()
Dim TheRng As Range
Set TheRng = Range("C1", Range("C" & Rows.Count).End(xlUp))
TheRng.Find(What:=Date, LookAt:=xlWhole).Offset(, 1).Value =
Range("A1").Value
End Sub

"GaryCam" wrote in
message ...

I'm totally new to this and need help desperately. I have a value in
cell A1 that I have to file away. Column C contains a list of all the
dates of the year. I need a macro that will check what today's date is,
find that date in Column C and copy the contents of cell A1 into the
cell immediately to the right of today's date (Column D).

I haven't written a macro since I used Visicalc. Your help & patience
is most appreciated!

~ Gary


--
GaryCam
------------------------------------------------------------------------
GaryCam's Profile:
http://www.excelforum.com/member.php...o&userid=32330
View this thread: http://www.excelforum.com/showthread...hreadid=520880