Macro, search date, copy & paste values

Closed
ashpash - Jun 9, 2010 at 04:55 AM
 ashpashbon - Jun 11, 2010 at 07:38 AM
Hello,
I am having problems writing a macro which will search for a date that is inputted at cell C1. IF the same date is mentioned in row 3 then copy all matching date data beneath it from D6 downwards, pastespecial values to sheet2, at the start of cell b3.
I have spent weeks trying, your help would be much appreciated!!



Related:

8 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jun 9, 2010 at 05:40 AM
post a very small extract of your sheet or upload the file in speedyshare.com
0
http://www.speedyshare.com/files/22871427/macro_pic.jpg" target="_blank">macro pic.jpg</a>
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 9, 2010 at 06:15 AM
ashpash, could you post an excel file instead of image.
0

Didn't find the answer you are looking for?

Ask a question
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Jun 9, 2010 at 10:44 PM
thank you for sending the data in excel 2007 format


I am completely confused. I managed download your file "macros that work"
There are six sheets . which is the main database sheet. I presume it is " a move stg".
There is no date in C1 there is only in D1. perhaps it is a typo error. Shall lI transfer it to C1.

Ok D1 is 5/29/06. This date is available in row no. 3 that is in E3.
Then the confusion starts.
"copy all matching date data beneath it from D6 "
what is meant by "matching" data. Why from D6 why not from E6(because the date is found in E3). do you want to copy only that column.

Paste in sheet 2. there is no sheet2.do you want me to insert a sheet and call it sheet2. Or is "chain list " is sheet 2
Where do you want to copy in this sheet. What is meant from "b3"

Sit down and Think for some time and explain with reference to cells in the sheet "a move stg" and sheet2 of your file.
You are welcome to add any other information.

By the by what are the other sheets.

Besides this workbook appears to be HIDDEN workbook and as such I am not able to see your macro

greetings
0
Hi Venkat1926
I cannot get the macro to run after sending the excel workbook to you. So I have shown a sample of what I am trying to achieve. Thankyou for your time so far!

"A move stg" is the main data sheet. In this scenario, Cell D1 is where you can specify a certain date. If date 29/05/06 is mentioned, find the same date in row 3 and copy data from C4 downwards. Yes I want to copy only this column to "chain list" sheet at cell C4.

Sheet "A move stg"
a b c d
1 29/05/06

2

3 26/05/07 29/05/06 25/06/10 28/09/05

4 222 30 525 5225
5 2222 50 2552 5522
6 52255 5588 558852 7885
0
Ok that did not copy the data in the same format, try this sample
Sheet "A Move Stg"
CELL D1=29/05/06
COLUMN A ROW 3 = 26/05/07
COLUMN B ROW 3 = 29/05/06
COLUMN C ROW 3 = 25/06/10
COLUMN D ROW 3 = 28/09/05

COLUMN A ROW 4 = 222
COLUMN A ROW 5 = 30
COLUMN A ROW 6= 525
COLUMN A ROW 7 = 5225

**Column B Values would only need to be copied since they relate to 29/05/06**
COLUMN B ROW 4 = 2222
COLUMN B ROW 5 = 50
COLUMN B ROW 6 = 2552
COLUMN B ROW 7 = 5522

COLUMN C ROW 4 = 52255
COLUMN C ROW 5 = 5588
COLUMN C ROW 6 = 558852
COLUMN C ROW 7 = 7885
0
Using the above sample, I wld like to say I am having trouble writing a macro which will search for a date that is inputted at cell "D1." IF the same date is mentioned in row 3 then copy all matching date data beneath it from B4 downwards (in this scenario, since B4=(29/05/06 the date I am searching for from the date input at D1) , pastespecial values from B4 downwards to sheet2 at the start of cell B3.
I apologise for all my confusion, "I am trying to get educated!"
0