replace cell value

  • Thread starter Thread starter hershel
  • Start date Start date
H

hershel

how to replace sheet1. cell a1 with shhet2 cell a1 if sheet 2 cell a2
matches sheet1 cell a2
 
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
 
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
 
Back
Top