ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro to go to cell based upon a calculation (https://www.excelbanter.com/excel-discussion-misc-queries/116094-macro-go-cell-based-upon-calculation.html)

MARK M

macro to go to cell based upon a calculation
 
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.

Jim Thomlinson

macro to go to cell based upon a calculation
 
Sheets("Sheet1").Select
Range("A1").Select

--
HTH...

Jim Thomlinson


"Mark M" wrote:

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.


Mark M

macro to go to cell based upon a calculation
 
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.

"Jim Thomlinson" wrote:

Sheets("Sheet1").Select
Range("A1").Select

--
HTH...

Jim Thomlinson


"Mark M" wrote:

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.


Lori

macro to go to cell based upon a calculation
 
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.

Mark M wrote:

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.

"Jim Thomlinson" wrote:

Sheets("Sheet1").Select
Range("A1").Select

--
HTH...

Jim Thomlinson


"Mark M" wrote:

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.



CyberTaz

macro to go to cell based upon a calculation
 
The limited info in your post suggests that you know what the value is. If
so, EditFind should be all you need. Otherwise post back with a much better
description of what your need is.
--
HTH |:)
Bob Jones
[MVP] Office:Mac

"Mark M" <Mark wrote in message
...
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.




Mark M

macro to go to cell based upon a calculation
 
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

Robert_NSBG

macro to go to cell based upon a calculation
 
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!!!

"Lori" wrote:

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.

Mark M wrote:

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.

"Jim Thomlinson" wrote:

Sheets("Sheet1").Select
Range("A1").Select

--
HTH...

Jim Thomlinson


"Mark M" wrote:

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.




Bernie Deitrick

macro to go to cell based upon a calculation
 
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



"Robert_NSBG" wrote in message
...
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!!!

"Lori" wrote:

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.

Mark M wrote:

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.

"Jim Thomlinson" wrote:

Sheets("Sheet1").Select
Range("A1").Select

--
HTH...

Jim Thomlinson


"Mark M" wrote:

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.







All times are GMT +1. The time now is 01:50 AM.

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