Copy Cell, Paste based on a match.

G

Guest

I am hoping someone can help,

I want to be able to copy a specific cell ("C3") in sheet1 and paste it to
another cell (Z?) in sheet2 based on a match of cell ("A3") in sheet1 to a
same matching record in sheet 2 out of column A, but the row number might be
2, 43, 76......

Thanks in advance for any help.
 
G

Guest

Sub copyandpaste()

Sheets("Sheet2").Activate

LastRowSh2 = Cells(Rows.Count, "A").End(xlUp).Row
Set FindRange = Range(Cells(1, "A"), Cells(LastRowSh2, "A"))

OldValue = Sheets("Sheet1").Range("A3")
NewValue = Sheets("Sheet1").Range("C3")

FindRange.Replace What:=OldValue, Replacement:=NewValue

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top