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


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

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default searching date

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

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


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


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
functions searching by date AJB Excel Discussion (Misc queries) 1 November 17th 08 09:32 PM
Searching a date range to output values according to a constant. Geebz Excel Discussion (Misc queries) 2 December 1st 06 09:34 AM
Searching a date range to output values according to a constant. daddylonglegs Excel Discussion (Misc queries) 0 November 30th 06 08:23 PM
Searching a date Neil Meehan Excel Discussion (Misc queries) 1 April 30th 06 03:12 PM
userform with date searching in worksheet excelnewbie166 Excel Programming 5 November 28th 03 09:58 PM


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