ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Go To Worksheet.Cell Referencing Another Worksheet.Cell (https://www.excelbanter.com/excel-programming/425835-go-worksheet-cell-referencing-another-worksheet-cell.html)

garyh

Go To Worksheet.Cell Referencing Another Worksheet.Cell
 
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

Jacob Skaria

Go To Worksheet.Cell Referencing Another Worksheet.Cell
 
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
-------------
Jacob Skaria


"garyh" wrote:

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


Gary''s Student

Go To Worksheet.Cell Referencing Another Worksheet.Cell
 
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

--
Gary''s Student - gsnu200840


"garyh" wrote:

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



All times are GMT +1. The time now is 06:02 AM.

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