LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Choosing a Formula Based on a Value

Thanks so much all for the quick replies... Is there anyway to do this where
the formulas are kept in their own fields? so formula1 is in B2, formula2 is
in b3 ect?
I would need the the references to remain relative.

Thanks again

"JE McGimpsey" wrote:

WIthout knowing specifics, it's impossible to tell for sure, but you
could certainly do something like this:

=CHOOSE(B1,<formula1,<formula2,<formula3...)

or group conditions, if possible, as long as the formula didn't get too
long.

My concern is that if you have more than 7 different formulae, auditing
your model to be sure that it's correct can be a nightmare. In my
experience, almost every useful models has at least one error when first
deployed, whether of logic or codeing. The codeing errors are relatively
easy to find. The logic errors are much tougher.

I'd look at breaking out the logic to multiple cells/regions.


In article ,
Rob Fox <Rob wrote:

How would I choose between several different formulas in a cell based on a
variable in another cell?


Simplified Example:

Let's say I have three fields, field 'A' has a number, field 'B' is our
variable and field 'C' either adds/subtracts or multiplies field 'A' by 5.

How do we get the formula in 'C' to change based on the value in 'B'? Let's
assume for the moment there are more than 7 different formulas so an IF/Then
might be tricky.

Is there anyway to do this without a macro?




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing a date from a list based on two criteria southbaysufer Excel Discussion (Misc queries) 2 October 23rd 09 08:59 PM
Choosing data based on Match to several items Nipper Excel Worksheet Functions 5 May 12th 06 07:19 PM
Choosing a formula to used based on a codition fulfilled The Big Dog Excel Discussion (Misc queries) 1 October 12th 05 04:16 PM
VBA - Choosing rows based on a criteria [email protected] Excel Programming 3 October 7th 05 12:30 AM


All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"