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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top