Dynamically Activating Cell

Ed S.

Board Regular
Joined
Mar 26, 2002
Messages
90
I locate a cell and save the positions:
SaveRow = ActiveCell.Row
SaveCol = ActiveCell.Column

If in Row 3, Col B - the values returned will be SaveRow - 3 ; SaveCol 2 (not B)

The difficulty is returning to, or positioning to, Row/Column Cell using the saved values.

What is the technique to select or activate a cell when the values are dynamically maintained? (Column is a numeric value.)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about this?

Dim wks As Worksheet

Set wks = ActiveSheet
wks.Cells(3, 2).Activate

Of course, the numbers 3 and 2 can be replaced by variables containing these numbers.
 
Upvote 0
Hi
SaveRow = ActiveCell.Row
SaveCol = ActiveCell.Column

Save your data into Cell B3 as follows:

SavePlace = Activecell.row & "," & activecell.column

The string variable will then =
SavePlace = "3,2"

Now use this syntax to activate the cell

Assuming the cell is on the activesheet

cells(SavePlace).activate
or
cells(SavePlace).select

Tom
This message was edited by TsTom on 2002-03-27 09:32
 
Upvote 0

Forum statistics

Threads
1,214,598
Messages
6,120,441
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top