replace cell value

H

hershel

how to replace sheet1. cell a1 with shhet2 cell a1 if sheet 2 cell a2
matches sheet1 cell a2
 
G

Gary''s Student

Run this small macro:

Sub ReplaceIt()
If Sheets("Sheet1").Range("A2").Value = Sheets("Sheet2").Range("A2").Value
Then
Sheets("Sheet1").Range("A1").Value = Sheets("Sheet2").Range("A1").Value
End If
End Sub
 
H

hershel

Run this small macro:

Sub ReplaceIt()
If Sheets("Sheet1").Range("A2").Value = Sheets("Sheet2").Range("A2").Value
Then
    Sheets("Sheet1").Range("A1").Value = Sheets("Sheet2").Range("A1").Value
End If
End Sub

--
Gary''s Student - gsnu200909





- Show quoted text -

but I never made a macro ,how do i do it ?

thanx
 

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