Go To Worksheet.Cell Referencing Another Worksheet.Cell

G

garyh

Is there a way to go to a cell in another worksheet that has an identical
value of a cell in another worksheet? Example:

Current cell location: worksheet1.A1

Reference cell location: worksheet1.A2

Cell to go to: worksheet2.[same data that is located in worksheet1.A1]

Any help with this is greatly appreciated. Thanks.

G
 
J

Jacob Skaria

Read out this post http://www.ozgrid.com/VBA/find-method.htm

To create a Visual Basic Sub procedure, follow these steps:
Start Excel.
Press ALT+F11 to start the Visual Basic editor.
On the Insert menu, click Module.
Enter the Sub procedure code in the module sheet.
Press ALT+F11 to return to Excel.
To run a Visual Basic Sub procedure, follow these steps:
On the Tools menu, point to Macro and then click Macros.
Select the macro (Sub procedure) that you want and then click Run.

If this post helps click Yes
 
G

Gary''s Student

Say we have some value in the activecell in Sheet1 and want to go to the cell
with the same value in Sheet2:

Sub GoHither()
Dim v As Variant
Dim cel As Range
v = ActiveCell.Value
Dim s As Worksheet
Set s = Sheets("Sheet2")
For Each cel In s.UsedRange
If cel.Value = v Then
s.Activate
cel.Select
Exit Sub
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top