ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move to a specific cell (https://www.excelbanter.com/excel-programming/305549-move-specific-cell.html)

JT[_2_]

Move to a specific cell
 
When my macro meets a certain condition, I create a
variable to identify the row in Col. A that I am in.

currentrow = activecell.row

I then move to A1 and move down through Col A. until I
find a cell that meets additional criteria. At this time,
the macro performs a subroutine. Once the subroutine is
completed, I want to move back to the cell in Col A that I
was in.

I tried the following:

Range(Cells(currentrow,0)).Select

to move back but that is not working for me.

I would appreciate any suggestions to move back to cell I
was in. Thanks for the help...

Don Guillett[_4_]

Move to a specific cell
 
mycell=activecell.address
range(mycell).select

However, these selections are almost always NOT necessary. What are you
trying to do?

--
Don Guillett
SalesAid Software

"JT" wrote in message
...
When my macro meets a certain condition, I create a
variable to identify the row in Col. A that I am in.

currentrow = activecell.row

I then move to A1 and move down through Col A. until I
find a cell that meets additional criteria. At this time,
the macro performs a subroutine. Once the subroutine is
completed, I want to move back to the cell in Col A that I
was in.

I tried the following:

Range(Cells(currentrow,0)).Select

to move back but that is not working for me.

I would appreciate any suggestions to move back to cell I
was in. Thanks for the help...





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

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