ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   replace cell value (https://www.excelbanter.com/excel-worksheet-functions/249141-replace-cell-value.html)

hershel

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

Gary''s Student

replace cell value
 
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


"hershel" wrote:

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


hershel

replace cell value
 
On Nov 22, 5:24*pm, Gary''s Student
wrote:
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



"hershel" wrote:
how to replace sheet1. cell a1 *with shhet2 cell a1 if sheet 2 cell a2
matches sheet1 cell a2
.- Hide quoted text -


- Show quoted text -


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

thanx


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com