ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do you get a row number is a Cell? (https://www.excelbanter.com/excel-programming/341533-how-do-you-get-row-number-cell.html)

CRayF

How do you get a row number is a Cell?
 
I'm searching the active Worksheet for a value and when found I want to
scroll to the row the value was found on as the ActiveWindow.ScrollRow.

Assuming the value was found in Range("A" & j + 5) how would I scroll to it?

This did not work...
ActiveWindow.ScrollRow = ActiveWindow.Range("A" & j + 5).Row




JMB

How do you get a row number is a Cell?
 
ActiveWindow.ScrollRow = j+5

"CRayF" wrote:

I'm searching the active Worksheet for a value and when found I want to
scroll to the row the value was found on as the ActiveWindow.ScrollRow.

Assuming the value was found in Range("A" & j + 5) how would I scroll to it?

This did not work...
ActiveWindow.ScrollRow = ActiveWindow.Range("A" & j + 5).Row




Gary Keramidas[_4_]

How do you get a row number is a Cell?
 
don't know what your value of j is, but i set it to 2 and it scrolls to a7


Sub rr()
Dim j As Integer
j = 2
ActiveWindow.ScrollRow = Range("A" & j + 5).Row
End Sub

--


Gary


"CRayF" wrote in message
...
I'm searching the active Worksheet for a value and when found I want to
scroll to the row the value was found on as the ActiveWindow.ScrollRow.

Assuming the value was found in Range("A" & j + 5) how would I scroll to
it?

This did not work...
ActiveWindow.ScrollRow = ActiveWindow.Range("A" & j + 5).Row






CRayF

How do you get a row number is a Cell?
 
thanks

"JMB" wrote:

ActiveWindow.ScrollRow = j+5

"CRayF" wrote:

I'm searching the active Worksheet for a value and when found I want to
scroll to the row the value was found on as the ActiveWindow.ScrollRow.

Assuming the value was found in Range("A" & j + 5) how would I scroll to it?

This did not work...
ActiveWindow.ScrollRow = ActiveWindow.Range("A" & j + 5).Row





All times are GMT +1. The time now is 09:15 AM.

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