A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Here's an example code:
Sub CopyValues()
Dim sourceSheet As Worksheet
Dim targetSheet As Worksheet
Dim sourceRange As Range
Dim targetRange As Range
Set sourceSheet = ThisWorkbook.Sheets("Sheet3")
Set targetSheet = ThisWorkbook.Sheets("Sheet1")
Set sourceRange = sourceSheet.Range("A1") 'Change this to the cell you want to copy from
Set targetRange = targetSheet.Range("A1") 'Change this to the corresponding cell in Sheet1
targetRange.Value = sourceRange.Value
End Sub
To use this macro, open the original spreadsheet and press Alt+F11 to open the VBA editor. Insert a new module and paste the code above. Then, save the file as a macro-enabled workbook (.xlsm) and close the VBA editor.
To run the macro, go back to the original spreadsheet and press Alt+F8 to open the macro dialog. Select the "CopyValues" macro and click "Run". This will copy the value from Sheet3 and paste it as a value in the corresponding cell in Sheet1.