ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding ROW without selecting worksheet (https://www.excelbanter.com/excel-programming/350420-finding-row-without-selecting-worksheet.html)

Jim at Eagle

finding ROW without selecting worksheet
 
Sheet4.Select
Sheet4.Range("G59").End(xlUp).Offset(1, 0).Select
Dest1 = ActiveCell.Row

Would like to locate the row # without selecting the worksheet or the range.
Is that possible when different worksheet is active?
--
Jim at Eagle

Norman Jones

finding ROW without selecting worksheet
 
Hi, Jim,

Without selection, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2)


---
Regards,
Norman


"Jim at Eagle" wrote in message
...
Sheet4.Select
Sheet4.Range("G59").End(xlUp).Offset(1, 0).Select
Dest1 = ActiveCell.Row

Would like to locate the row # without selecting the worksheet or the
range.
Is that possible when different worksheet is active?
--
Jim at Eagle




Norman Jones

finding ROW without selecting worksheet
 
Hi Jim,

If, however, the row was your target, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2).EntireR ow


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi, Jim,

Without selection, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2)


---
Regards,
Norman


"Jim at Eagle" wrote in message
...
Sheet4.Select
Sheet4.Range("G59").End(xlUp).Offset(1, 0).Select
Dest1 = ActiveCell.Row

Would like to locate the row # without selecting the worksheet or the
range.
Is that possible when different worksheet is active?
--
Jim at Eagle






Bill Martin[_2_]

finding ROW without selecting worksheet
 
Taking the uncertainty in the original note a bit further, if "locate the row #"
literally means the number of the row then:

dim LastRow as long
LastRow = range("G59").end(xlup).row

Bill
-------------------------
Norman Jones wrote:
Hi Jim,

If, however, the row was your target, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2).EntireR ow


---
Regards,
Norman



"Norman Jones" wrote in message
...

Hi, Jim,

Without selection, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2)


---
Regards,
Norman


"Jim at Eagle" wrote in message
...

Sheet4.Select
Sheet4.Range("G59").End(xlUp).Offset(1, 0).Select
Dest1 = ActiveCell.Row

Would like to locate the row # without selecting the worksheet or the
range.
Is that possible when different worksheet is active?
--
Jim at Eagle






Jim at Eagle

finding ROW without selecting worksheet
 
Thanks,
LastRow = Sheet4.Range("G59").End(xlUp)(2).Row
I needed the the first empty cell to append new data to.
--
Jim at Eagle


"Bill Martin" wrote:

Taking the uncertainty in the original note a bit further, if "locate the row #"
literally means the number of the row then:

dim LastRow as long
LastRow = range("G59").end(xlup).row

Bill
-------------------------
Norman Jones wrote:
Hi Jim,

If, however, the row was your target, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2).EntireR ow


---
Regards,
Norman



"Norman Jones" wrote in message
...

Hi, Jim,

Without selection, try:

Dim rng As Range

Set rng = Sheets("Sheet4").Range("G59").End(xlUp)(2)


---
Regards,
Norman


"Jim at Eagle" wrote in message
...

Sheet4.Select
Sheet4.Range("G59").End(xlUp).Offset(1, 0).Select
Dest1 = ActiveCell.Row

Would like to locate the row # without selecting the worksheet or the
range.
Is that possible when different worksheet is active?
--
Jim at Eagle







All times are GMT +1. The time now is 10:30 AM.

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