PC Review


Reply
Thread Tools Rate Thread

Changing function name in formula

 
 
kittronald
Guest
Posts: n/a
 
      19th Jul 2011
I'm trying to create a formula that will allow changing the
function used.

For example:

A B
1 2 Product
2 3
3
4 =B1(A1:A2)

=B1(A1:A2) should evaluate to 6.

How can I get B1 to not be evaluated as text ?


- Ronald K.
 
Reply With Quote
 
 
 
 
Sixthsense
Guest
Posts: n/a
 
      20th Jul 2011
Hi Ronald,

Place the cursor in B1 cell and press Alt+E+A+F and copy and the paste
or type the below formula B1 cell

=Sum(A1:A2)

Or
=A1+A2

The above formula will evaluate the result as 5.

Hope that helps!

---

Sixthsense


On Jul 20, 3:45*am, kittronald <kittron...@yahoo.com> wrote:
> * *I'm trying to create a formula that will allow changing the
> function used.
>
> * *For example:
>
> * * * * A * * * B
> 1 * * * 2 * * * Product
> 2 * * * 3
> 3
> 4 * * * =B1(A1:A2)
>
> * *=B1(A1:A2) should evaluate to 6.
>
> * *How can I get B1 to not be evaluated as text ?
>
> - Ronald K.


 
Reply With Quote
 
David Biddulph
Guest
Posts: n/a
 
      20th Jul 2011
I think the OP wanted the product, not the sum.
=PRODUCT(A1:A2) or =A1*A2 will give the product.

David Biddulph


On 20/07/2011 08:04, Sixthsense wrote:
> Hi Ronald,
>
> Place the cursor in B1 cell and press Alt+E+A+F and copy and the paste
> or type the below formula B1 cell
>
> =Sum(A1:A2)
>
> Or
> =A1+A2
>
> The above formula will evaluate the result as 5.
>
> Hope that helps!
>
> ---
>
> Sixthsense
>
>
> On Jul 20, 3:45 am, kittronald<kittron...@yahoo.com> wrote:
>> I'm trying to create a formula that will allow changing the
>> function used.
>>
>> For example:
>>
>> A B
>> 1 2 Product
>> 2 3
>> 3
>> 4 =B1(A1:A2)
>>
>> =B1(A1:A2) should evaluate to 6.
>>
>> How can I get B1 to not be evaluated as text ?
>>
>> - Ronald K.

>


 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      20th Jul 2011
hi,

=EvaluateString(B1&"(A1:A2)")

Function EvaluateString(tString As String)
EvaluateString = Evaluate(tString)
End Function

cell B1 can contain a function like
Product, Sum, Max, Min, etc..



--
isabelle

 
Reply With Quote
 
kittronald
Guest
Posts: n/a
 
      20th Jul 2011
Isabelle,

Thanks for the response and understanding what I was trying to
accomplish.

For calculating one cell, your solution works.

Is there a way to modify it so that I can Fill Down or Fill Right.

For example, if I were to fill right ...

=EvaluateString($B$1&"(A1:A2)")

it should look like ...

=EvaluateString($B$1&"(B1:B2)").


- Ronald K.
 
Reply With Quote
 
kittronald
Guest
Posts: n/a
 
      20th Jul 2011
Isabelle,

Figured it out.

=EvaluateString($B$1)(A1:A2)

You're The Man ... I mean you're The Woman.

Thanks for the help.


- Ronald K.
 
Reply With Quote
 
Gord
Guest
Posts: n/a
 
      21st Jul 2011
You have tested this thoroughly?


Gord Dibben Microsoft Excel MVP


On Wed, 20 Jul 2011 15:49:26 -0700 (PDT), kittronald
<(E-Mail Removed)> wrote:

>Isabelle,
>
> Figured it out.
>
> =EvaluateString($B$1)(A1:A2)
>
> You're The Man ... I mean you're The Woman.
>
> Thanks for the help.
>
>
>- Ronald K.

 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      21st Jul 2011
wow, i can confirm that neni ;-)


--
isabelle


Le 2011-07-20 19:04, Gord a écrit :
> You have tested this thoroughly?

 
Reply With Quote
 
isabelle
Guest
Posts: n/a
 
      21st Jul 2011
hi kittronald,

> =EvaluateString($B$1&"(B1:B2)").


the cell "B1" can not be do "function name" and be a part of the evaluation


--
isabelle

 
Reply With Quote
 
kittronald
Guest
Posts: n/a
 
      21st Jul 2011
Isabelle,

<Sound of air leaving balloon>

Ok, so I'm back to square one.

I was using a different, third party function, that when evaluated,
mysteriously returned a number - which led me to believe the correct
value was being returned.

Basically, I'm trying to mass replace a function without resorting
to using a macro that performs a Search and Replace.

If B1 were the linked cell of a ComboBox that had multiple function
names, how could I achieve the initial solution ?

And how did I earn the title of a Hungarian aunt ?



- Ronald K.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the range for averages with out changing the formula. JessLRC Microsoft Excel Worksheet Functions 0 20th Apr 2010 03:10 PM
how to edit formula without changing formula of each cell =?Utf-8?B?c2FkYXQ=?= Microsoft Excel Worksheet Functions 2 24th Apr 2007 02:02 PM
Copy Formula Down Without Changing Entire Formula =?Utf-8?B?cm95Lm9raW5hd2E=?= Microsoft Excel Misc 3 16th Mar 2006 01:54 AM
Changing a delete function to an export function =?Utf-8?B?bm1hcmFubw==?= Microsoft Access VBA Modules 4 11th Mar 2005 01:05 AM
Can I use TODAY Function in formula without it changing the next . =?Utf-8?B?VHVjc29uIEd1eQ==?= Microsoft Excel Misc 1 19th Dec 2004 09:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:35 PM.