macro to go to cell based upon a calculation

M

Mark M

I am trying to create a button with a embedded macro that will take me to a
cell containing a value, which is calculated somewhere else in the
spreadsheet. I assume this is easy, but I am not VBA skilled.
 
M

Mark M

thanks Jim. I think I still need some assistance in that the cell in not
fixed, I must first locate the cell based upon the calculation. For
instance, if the calculate value is 2109, I must find the cell (in a known
column) that contains that value than go to it using a button and imbedded
macro. In the spreadsheet, I can find the cell, but I am not sure how to
applie it in the macro.
 
L

Lori

If 2109 is in A1, and you want to select a cell in that row type
indirect("a"&A1) in the name box (next to the formula bar). Choose
Tools-Macro-Record New Macro first to get the code for this.
 
C

CyberTaz

The limited info in your post suggests that you know what the value is. If
so, Edit>Find should be all you need. Otherwise post back with a much better
description of what your need is.
 
M

Mark M

thanks to all for their responses. My inability to adequately describe the
need hampered the dialogue, but Lori's solution was right on!

thanks

mark
 
R

Robert_NSBG

I have the same problem, your answer is getting me very close but I'm still
just a bit off.
I have a table: (5 colums / 13 rows) the first row names the columns accross
"1" ,"2", "3" and so on.

on the same sheet there is a cell (not in the 13/5 table) where I input a
number (input cell) between 1 and 5. I need a macro to read the value in that
"input cell" and then go to the column (1,2,3,4,5) based on the number in the
input cell.

HELP!!!
 
B

Bernie Deitrick

Robert,

If your table is in, say, B11:F23, and if your "Input cell" is cell G5, and
you want to select the cell in row 2 of that table, then use something like:

Sub Robert()
Dim RowNumber As Long
RowNumber = 2 'Change this to the row that you want to select
Range("B11:F23").Cells(RowNumber, Range("G5").Value).Select
End Sub

HTH,
Bernie
MS Excel MVP
 
Top