ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select corresponding row on another worksheet (https://www.excelbanter.com/excel-programming/376433-select-corresponding-row-another-worksheet.html)

aehan

Select corresponding row on another worksheet
 
Hello

I'm trying to write some code that will select the corresponding row on
another worksheet to the current row on the existing worksheet, and I'm
failing miserably. Can someone help me please.

Thankyou
Aehan

Jim May

Select corresponding row on another worksheet
 
In a standard module enter:

Sub tester()
Application.ScreenUpdating = False
MyRow = ActiveCell.Row
Sheets("Sheet1").Activate
Rows(MyRow).Select
Application.ScreenUpdating = True
End Sub

Create a forms button to run tester


"aehan" wrote:

Hello

I'm trying to write some code that will select the corresponding row on
another worksheet to the current row on the existing worksheet, and I'm
failing miserably. Can someone help me please.

Thankyou
Aehan


Tom Ogilvy

Select corresponding row on another worksheet
 


Dim rng as Range
set rng = ActiveCell
Application.Goto worksheets("Sheet2").rows(rng.row), true

--
Regards,
Tom Ogilvy


"aehan" wrote:

Hello

I'm trying to write some code that will select the corresponding row on
another worksheet to the current row on the existing worksheet, and I'm
failing miserably. Can someone help me please.

Thankyou
Aehan


aehan

Select corresponding row on another worksheet
 
Thankyou, both Tom and Jim, both solutions work and you have really helped me.

Aehan

"Tom Ogilvy" wrote:



Dim rng as Range
set rng = ActiveCell
Application.Goto worksheets("Sheet2").rows(rng.row), true

--
Regards,
Tom Ogilvy


"aehan" wrote:

Hello

I'm trying to write some code that will select the corresponding row on
another worksheet to the current row on the existing worksheet, and I'm
failing miserably. Can someone help me please.

Thankyou
Aehan



All times are GMT +1. The time now is 03:30 PM.

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