A macro to change the values on a specified cell
Closed
prov
-
Aug 25, 2015 at 07:19 AM
TrowaD
TrowaD
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Related:
- A macro to change the values on a specified cell
- Excel - A macro to change the color of row on condition - How-To - Excel
- It restricts what values are possible for cells that contain numbers, dates, and text ✓ - Forum - Excel
- Conditional formatting change font color based on another cell ✓ - Forum - Excel
- Change color to different cells based on another cells text. ✓ - Forum - Excel
- Change your Skype display name: PC, cell phone - Guide
1 reply
TrowaD
Aug 27, 2015 at 11:32 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Aug 27, 2015 at 11:32 AM
Hi Kaan,
How about this code:
Note 1: Since your result is 'Sheet1'$G$5, I assumed your formula should have been A:A instead of G:G.
Note 2: Your destination sheet is called "Sheet1", but you didn't mention the source sheet name. I took the liberty to call it "Master".
Best regards,
Trowa
How about this code:
Sub RunMe() Dim MyValue As String Dim cFind As Range MyValue = Sheets("Master").Range("N7").Value Sheets("Sheet1").Select Set cFind = Columns("A:A").Find(MyValue) If cFind Is Nothing Then MsgBox "Value not found." Exit Sub End If cFind.Offset(0, 6).Value = MyValue End Sub
Note 1: Since your result is 'Sheet1'$G$5, I assumed your formula should have been A:A instead of G:G.
Note 2: Your destination sheet is called "Sheet1", but you didn't mention the source sheet name. I took the liberty to call it "Master".
Best regards,
Trowa