Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Adding a Number and Formula Text and Evaluating

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Adding a Number and Formula Text and Evaluating

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
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
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
evaluating text as if it were a formula Peter Facey Excel Discussion (Misc queries) 2 January 31st 08 05:20 PM
evaluating text of cells [email protected] Excel Discussion (Misc queries) 1 January 22nd 08 07:03 PM
evaluating text cell contents Dave B Excel Discussion (Misc queries) 1 January 3rd 06 10:51 PM
Evaluating similarity of text strings Alan Excel Worksheet Functions 6 March 30th 05 01:35 AM
adding to a number containing text R D S Excel Discussion (Misc queries) 4 January 21st 05 03:55 AM


All times are GMT +1. The time now is 02:16 PM.

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"