ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find date and copy selection (https://www.excelbanter.com/excel-programming/351916-find-date-copy-selection.html)

redb

find date and copy selection
 
Hi! Im trying to use the VBA Find function to use a date entered on
Sheet1!A1 to locate a date on Sheet2. Once I find the date, I want to copy a
range located above the date. For example, in the setup below, on Sheet1!A1,
the date entered would be 24-Jan-06 and I would want to select 16-Jan-06 thru
22-Jan-06. If this info helps, the date on Sheet1 would always be a Tuesday
and I would only want to select the previous weeks data, beginning on Monday
and ending on Sunday. Also, I dont want to select the entire row, but a
range of columns that wont change, ie it would always be A:K. And,
unfortunately, I would only want to find the first instance of 24-Jan-06 as
there is a possibility of a second occurrence of the date in Sheet2. If
anyone out there has any insights to share, it would be appreciated!

16-Jan-06 174.7 100
17-Jan-06 405.2 1191
18-Jan-06 92 72.5
19-Jan-06 209.45 173
20-Jan-06 262.95 238
21-Jan-06 0 0
22-Jan-06 0 0
23-Jan-06 155.75 84.5
24-Jan-06 175.7 75.5



All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com