searching date

  • Thread starter Thread starter Irunalotta
  • Start date Start date
I

Irunalotta

Can someone show me how I would write code to search a worksheet for
specific date and then paste my selection to the cell next to it
Thanks.

-Jerem
 
Dim dDate as Date
Dim rng as Range
Dim res as Variant
dDate = DateValue("12/21/2002")
set rng = Range("C1:C200")
res = Application.Match(clng(dDate),rng,0)
if not iserror(res) then
rng(res).Value = activecell.value
End if

--
Regards,
Tom Ogilvy


Irunalotta said:
Can someone show me how I would write code to search a worksheet for a
specific date and then paste my selection to the cell next to it.
Thanks.

-Jeremy


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 
Back
Top