#1   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default paste by date

I have a macro below where the search takes the information from Cell A1 adds
it to a hyperlink, copies information and pastes it back into excel.
Currently I have the range set to Z3 and Z15 where it pastes. My question is
if the Cell is A1 and has a date in it, how can I have it find another cell
with the same information and paste underneath it?

If cells go like:
5/25, 5/26, 5/27

How can I paste if the search was for the 26th without specifying directly?


Range("A2").Select
Selection.Copy
Application.CutCopyMode = False
Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"/total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"
Range("B6").Select
Selection.UnMerge
Range("B6:B16").Select
Selection.Copy
ActiveWorkbook.Close
Application.DisplayAlerts = False
Sheets("Sheet1").Select
Range("z3").Select
ActiveSheet.Paste
Workbooks.Open Filename:= _
"/total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"
Range("B18").Select
Selection.UnMerge
Range("B18:B28").Select
Selection.Copy
ActiveWorkbook.Close
Sheets("sheet1").Select
Range("z15").Select
ActiveSheet.Paste

  #2   Report Post  
Posted to microsoft.public.excel.misc
KellTainer
 
Posts: n/a
Default paste by date


Try using the Find method in VBA, where you can take in a specific
information to search for, where you can reference that from your
search range. Use the VBA Help to see how it works.


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546326

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
average value from a table TUNGANA KURMA RAJU Excel Discussion (Misc queries) 15 March 21st 06 06:52 AM
Insert Automatic, Non-Updating Date Stamp Ken Zenachon Excel Discussion (Misc queries) 8 January 18th 06 06:52 PM
Calculate 1st of month date from existing date. Jim15 Excel Discussion (Misc queries) 1 January 9th 06 10:05 PM
excel - numbers as text Thuferhawat New Users to Excel 12 January 24th 05 09:29 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 03:51 PM


All times are GMT +1. The time now is 08:55 PM.

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"