#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Value function

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Value function

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Value function

Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Value function

The "/" in the text string do not represents a number.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Value function

No.

If A1 contains 200/7 that is a text string.

=Value(200/7)

Returns the correct result because 200 is being divided by 7 and that result
which is a number is passed to the VALUE function for further calculation.
However, using the VALUE function in this manner is redundant.

=VALUE(A1)

Retunrs a #VALUE! error because 200/7 is a rext string *and* the calculation
of 200 divided by 7 is not taking place.

VALUE returns the numeric equivalent of a text number. To see how it works
try this:

A1 = 200/7

Enter this formula in a cell, say D1:

=LEFT(A1,3)

The result is the TEXT string 200. To see that it is in fact a TEXT string
try these formulas to test it:

=ISTEXT(D1) will return TRUE
=ISNUMBER(D1) will return FALSE

Also note that the cell alignment is to the left. TEXT aligns left and
numeric numbers align right.

Now try this formula in D1:

=VALUE(LEFT(A1,3))

Notice all the changes. The cell is now aligned right and the results of
ISTEXT and ISNUMBER have reversed.

Note however, the use of the VALUE function is almost never needed. You can
convert TEXT numbers to NUMERIC numbers by using double negation. Like this:

=--LEFT(A1,3)

Also, any math operation on a TEXT number will coerce it to a numeric
number:

=LEFT(A1,3)+0
=LEFT(A1,3)*1
=LEFT(A1,3)/RIGHT(A1,1)

To get the result that you expect requires a special functon. Try this:

*Select cell B1*
Goto the menu InsertNameDefine
Name: Calculate
Refers to: =EVALUATE(A1)
OK

Now type this into cell *B1* :

=CALCULATE


--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a
fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Value function

Hi Bif,
Thanks for taking the time to explain that.
And putting 'Evaluate' into a named formula is completely new to me. I
couldn't find 'Evaluate' in the list of Worksheet functions, and the Help
gave no relevant hits. How do you know this stuff?

Dave.

"T. Valko" wrote:

No.

If A1 contains 200/7 that is a text string.

=Value(200/7)

Returns the correct result because 200 is being divided by 7 and that result
which is a number is passed to the VALUE function for further calculation.
However, using the VALUE function in this manner is redundant.

=VALUE(A1)

Retunrs a #VALUE! error because 200/7 is a rext string *and* the calculation
of 200 divided by 7 is not taking place.

VALUE returns the numeric equivalent of a text number. To see how it works
try this:

A1 = 200/7

Enter this formula in a cell, say D1:

=LEFT(A1,3)

The result is the TEXT string 200. To see that it is in fact a TEXT string
try these formulas to test it:

=ISTEXT(D1) will return TRUE
=ISNUMBER(D1) will return FALSE

Also note that the cell alignment is to the left. TEXT aligns left and
numeric numbers align right.

Now try this formula in D1:

=VALUE(LEFT(A1,3))

Notice all the changes. The cell is now aligned right and the results of
ISTEXT and ISNUMBER have reversed.

Note however, the use of the VALUE function is almost never needed. You can
convert TEXT numbers to NUMERIC numbers by using double negation. Like this:

=--LEFT(A1,3)

Also, any math operation on a TEXT number will coerce it to a numeric
number:

=LEFT(A1,3)+0
=LEFT(A1,3)*1
=LEFT(A1,3)/RIGHT(A1,1)

To get the result that you expect requires a special functon. Try this:

*Select cell B1*
Goto the menu InsertNameDefine
Name: Calculate
Refers to: =EVALUATE(A1)
OK

Now type this into cell *B1* :

=CALCULATE


--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a
fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Value function

Hi Dave
You could get round it with a named formula
InsertNameDefine
Name Eval
Refers to =EVALUATE($A1)

In B1 enter =Eval and you will see the result 28.57143
Because the formula is locked to column A but relative for rows, as you copy
down it will give the corresponding results for A2, A3 etc.

--
Regards
Roger Govier

"Dave" wrote in message
...
Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a
fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Value function

How do you know this stuff?

Through experience.

EVALUATE is an Excel macro function, it's not a regular worksheet function.
In fact, you can't use it directly on a worksheet and that's why you need to
create the defined name in order to use it.

Macro functions were used in older versions of Excel until they were
replaced with VBA, an extended version of the Visual Basic programming
language. The macro functions are still supported but not documented in
newer versions of Excel.


--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi Bif,
Thanks for taking the time to explain that.
And putting 'Evaluate' into a named formula is completely new to me. I
couldn't find 'Evaluate' in the list of Worksheet functions, and the Help
gave no relevant hits. How do you know this stuff?

Dave.

"T. Valko" wrote:

No.

If A1 contains 200/7 that is a text string.

=Value(200/7)

Returns the correct result because 200 is being divided by 7 and that
result
which is a number is passed to the VALUE function for further
calculation.
However, using the VALUE function in this manner is redundant.

=VALUE(A1)

Retunrs a #VALUE! error because 200/7 is a rext string *and* the
calculation
of 200 divided by 7 is not taking place.

VALUE returns the numeric equivalent of a text number. To see how it
works
try this:

A1 = 200/7

Enter this formula in a cell, say D1:

=LEFT(A1,3)

The result is the TEXT string 200. To see that it is in fact a TEXT
string
try these formulas to test it:

=ISTEXT(D1) will return TRUE
=ISNUMBER(D1) will return FALSE

Also note that the cell alignment is to the left. TEXT aligns left and
numeric numbers align right.

Now try this formula in D1:

=VALUE(LEFT(A1,3))

Notice all the changes. The cell is now aligned right and the results of
ISTEXT and ISNUMBER have reversed.

Note however, the use of the VALUE function is almost never needed. You
can
convert TEXT numbers to NUMERIC numbers by using double negation. Like
this:

=--LEFT(A1,3)

Also, any math operation on a TEXT number will coerce it to a numeric
number:

=LEFT(A1,3)+0
=LEFT(A1,3)*1
=LEFT(A1,3)/RIGHT(A1,1)

To get the result that you expect requires a special functon. Try this:

*Select cell B1*
Goto the menu InsertNameDefine
Name: Calculate
Refers to: =EVALUATE(A1)
OK

Now type this into cell *B1* :

=CALCULATE


--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Yeah, but the description of Value is:
Converts a text string that represents a number to a number.
So it shouldn't matter that xl identifies 200/7 as text.
Dave.

"Jacob Skaria" wrote:

This is similar to =VALUE("200/7"). Excel do not identify 200/7 as a
fraction
but as a text string; and hence returns error.

If this post helps click Yes
---------------
Jacob Skaria


"Dave" wrote:

Hi all,
XL2003.
I have a fraction, say 200/7, in A1.
In B1, I have: =Value(200/7), which returns the right answer.
In C1, I have: =Value(A1), which returns a #Value! error.
What am I doing wrong?
Thanks in advance.
Dave.






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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 10:00 AM.

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

About Us

"It's about Microsoft Excel"