PC Review


Reply
Thread Tools Rate Thread

Adding a Number and Formula Text and Evaluating

 
 
obrien234
Guest
Posts: n/a
 
      1st Jul 2008
I have two separate cells. One is a number, for example cell B1 with a value
of 0.109. The other, B2, is in the format "* A1". I'm trying to combine the
two cells so they will display the value of "0.109 * A1", where A1 is a
reference to the cell A1. I've copied these cells from another program and
Excel does not seem to recognize that the text "* A1" works in a formula.
I've tried using a formula like

B1&B2
or
B1+B2

but the formatting is not correct and excel just displays the function
without evaluating it to the number it should represent. Any suggestions?

thank you
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      1st Jul 2008
Use this UDF which you would copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

With 0.109 in B1 and 100 in A1 and * A1 in C1 enter in D1

=EvalCell(B1 & C1) return 10.9


Gord Dibben MS Excel MVP


On Tue, 1 Jul 2008 12:10:01 -0700, obrien234
<(E-Mail Removed)> wrote:

>I have two separate cells. One is a number, for example cell B1 with a value
>of 0.109. The other, B2, is in the format "* A1". I'm trying to combine the
>two cells so they will display the value of "0.109 * A1", where A1 is a
>reference to the cell A1. I've copied these cells from another program and
>Excel does not seem to recognize that the text "* A1" works in a formula.
>I've tried using a formula like
>
>B1&B2
>or
>B1+B2
>
>but the formatting is not correct and excel just displays the function
>without evaluating it to the number it should represent. Any suggestions?
>
>thank you


 
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
Adding a number with a formula Jim Microsoft Excel Misc 2 3rd Sep 2009 10:37 PM
evaluating text as if it were a formula Peter Facey Microsoft Excel Misc 2 31st Jan 2008 05:20 PM
Formula to change scientific number to regular number or text =?Utf-8?B?Q29tcGFyZSBWYWx1ZXM=?= Microsoft Excel Misc 2 23rd Aug 2007 06:10 PM
Evaluating results of a concatenate formula, as a formula =?Utf-8?B?ZG9kZ2Vy?= Microsoft Excel Worksheet Functions 5 9th Sep 2005 01:55 PM
formula/function to change a number formatted as text to being an actual number =?Utf-8?B?Sm9l?= Microsoft Excel Misc 2 16th Dec 2003 07:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:07 AM.