PDA

View Full Version : Copy & Paste Dates with Macro



adamsm
07-25-2010, 03:26 AM
Hi anyone,

I’m having a workbook where I'm trying to figure out a code that could copy the dates from column “F” of the sheet “Invoice” and paste them to each row that matches with the serial number in the column “A” of the sheet “Orders”.

Any help on this would be kindly appreciated.

I’ve attached the workbook for your reference.

p45cal
07-25-2010, 05:08 AM
for others, see also your very similar thread http://www.mrexcel.com/forum/showthread.php?t=483609
(http://www.mrexcel.com/forum/showthread.php?t=483609)

Sub blah()
With Sheets("Orders").Range("A5:A3562")
.FormulaR1C1 = "=VLOOKUP(RC[1],Invoice!R4C2:R1244C6,5,FALSE)"
.Value = .Value
End With
End Sub

adamsm
07-25-2010, 05:50 AM
Thanks for the help p45cal. I do really appreciate it.

Simon Lloyd
07-25-2010, 06:16 AM
p45cal thanks for pointing out the crosspost.

adamsm please read the explanation from Ken Puls (administrator here) which can be found in the crosspost link in my signature!

adamsm
07-25-2010, 07:48 AM
Sure Simon. I'll read what you've suggested. Thanks for the response.