#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default #Value Error

Why am I getting this error when I am trying to find the difference between 2
numbers say a6-a140

Each cell has a formula to pull data however in some cases there is no data

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default #Value Error

The #Value errors means that one of your cells is not a number. Excel sees
it as text. Ensure your cells (a6 and a140 in your example) are numbers, and
the #Value error will go away. Using =isnumber(a6) is an easy way to test
for the type of data in the cell.

Often this arises when people put quotes around numbers, typically in an If
statement. This creates text, not numbers, even though there's no
discernable difference displayed.

Wrong way:
=if(a1="","10","6")

Right way:
=if(a1="",10,6)

Regards,
Fred.

"Curtis" wrote in message
...
Why am I getting this error when I am trying to find the difference
between 2
numbers say a6-a140

Each cell has a formula to pull data however in some cases there is no
data

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default #Value Error

One option to tinker ..
Instead of: =A6-A140
you could try: =SUM(A6)-SUM(A140)
SUM ignores text, hence the above will effectively ignore the "no data"
return in A6 and/or A140
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Curtis" wrote:
Why am I getting this error when I am trying to find the difference between 2
numbers say a6-a140

Each cell has a formula to pull data however in some cases there is no data

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default #Value Error

"Curtis" wrote:
Why am I getting this error when I am trying to find the difference
between 2 numbers say a6-a140

Each cell has a formula to pull data however in some cases there
is no data


"Fred Smith" wrote:
Wrong way:
=if(a1="","10","6")
Right way:
=if(a1="",10,6)


Only after you correct any problems like the one Fred mentions (good
advice), if the problem persists, I suspect that "no data" means a null
string of the form "".

In that case, there are several things you can do, depending on the desired
outcome. The simplest:

=n(A6)-n(A140)

That will treat "" like zero.

Alternatively, perhaps you would like the following:

=if(count(A6,A140)=2, A6-A140, "")

That performs the arithmetic only if both cells have values; otherwise, the
result appears blank.


----- original message -----

"Fred Smith" wrote in message
...
The #Value errors means that one of your cells is not a number. Excel sees
it as text. Ensure your cells (a6 and a140 in your example) are numbers,
and the #Value error will go away. Using =isnumber(a6) is an easy way to
test for the type of data in the cell.

Often this arises when people put quotes around numbers, typically in an
If statement. This creates text, not numbers, even though there's no
discernable difference displayed.

Wrong way:
=if(a1="","10","6")

Right way:
=if(a1="",10,6)

Regards,
Fred.

"Curtis" wrote in message
...
Why am I getting this error when I am trying to find the difference
between 2
numbers say a6-a140

Each cell has a formula to pull data however in some cases there is no
data

Thanks



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
Excel 2007 - error saving file & error loading dll TinaF Excel Discussion (Misc queries) 0 July 1st 09 01:49 PM
Error of slope taking into account error of the data points cer144 Excel Worksheet Functions 5 July 7th 08 07:26 PM
Error: "Excel encountered an error and had to remove some formatti Carl Excel Discussion (Misc queries) 0 September 18th 06 06:39 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM


All times are GMT +1. The time now is 06:43 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"