Creating a goto/anchor in excel based on a cell value

  • Thread starter Thread starter tushargarg729
  • Start date Start date
T

tushargarg729

Hello,

I am creating a financial worksheet for a client in which the user can
choose options from a drop down menu. What I want to happen is, based
on the option the user chooses, the model sends them to a certain cell
on the same sheet.

Ex:
If user chooses 1 from the drop down, it sends them to cell A4. If the
user chooses 2 from the drop down, it sends them to cell A5.

Also, I would like to know how to trigger a macro based on a cell value

Here is the code I thought might work
=if(A1=1, Run_OLM(),"")

Any advice on these topics is much appreciated. Thanks in advance.

Tushar
 
You can't run macros from a formula. But you can use an event (worksheet_change
or worksheet_calculate) to make it look like the formula called the macro.

Debra Dalgleish has some sample workbooks that may help you at:

http://www.contextures.com/excelfiles.html
Look for: Product List by Category

If you're using xl97, take a look at the xl97 workbooks. They have buttons
adjacent to the cell that actually run the macro. (xl97 didn't fire the
worksheet_change event (fixed in xl2k).)
 
Thanks for your help

I have another question for you. I want the user to be able to set a
default value for a certain number of years.

Ex: Set $500,000 from 2005-2008.

The model runs on a 30 year schedule. I want them to set a value for a
5 year block and maybe another value for a 10 year block. How do i do
this? Thanks
 
Ok.

The way it works is, the user will input the value in one cell. Say in
A1.
Then, they have the option to set it the start year and the end year to
which they want to apply this value. Or, they can click on another
button and set it as the value for all 30 years. I have the macro done
for 30 years. I am not sure how to set up the macro that will take the
start year and the end year that the user has input and apply the value
to those years

Ex. User inputs $500,000 in A1. Options are, apply for all 30 years or
apply to 2005-2008.

Thanks.
 
I'm not sure this will help, but when I want to allow users to supersede the
results of my formulas, I use some extra columns:

A B C D
Description (myformula) (userinput) =if(c1<>"",c1,b1)

Then I base all my formulas down the road on the results in column D.

I don't need a macro to do anything special, either.
 
I am trying to create an option such that, the user can input a default

value in one cell, enter a start year, and the number of years he wants

to assign this value for.


Ex.
A B C
1 Value Start Year # of Years
2 500 2005 5


Apply 500 starting in 2005 for the next five years including 2005.


I am working in Excel2000.
 
I am trying to create an option such that, the user can input a default

value in one cell, enter a start year, and the number of years he wants

to assign this value for.


Ex.
A B C
1 Value Start Year # of Years
2 500 2005 5


Apply 500 starting in 2005 for the next five years including 2005.


I am working in Excel2000. Thanks for your help
 
Back
Top