how to select a cell based on the cell value(cell address written in a cell)

ankur0000

New Member
Joined
May 31, 2019
Messages
2
Dear Team,
i am new in VBA using macro by record macro only. Kindly help to correct the below mention VBA code. I want to select a cell in sheet1 based on the cell value in sheet2(cell E3). E3 contain the Cell address of required cell selection. like in below macro address is "A10". but it should be dyanamic. if E3 values changes to A15 or A11 it should select A15 or A11 cell of Sheet 1.
Kindly help.
Sub Macro2()
'
' Macro2 Macro
'


'
Range("E3").Select
Selection.Copy
Sheets("Sheet1").Select
Application.Goto Reference:="R10C1"
Sheets("Sheet2").Select
Range("E4:G4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet2").Select
Range("E2").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub


Kindly help
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi & welcome to MrExcel
How about
Code:
   Application.Goto Sheets("Sheet1").Range(Sheets("sheet2").Range("E3").Value)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top