LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 6 Jul 2005 17:04:03 -0700, MM_BAM
wrote:

I have a workbook with several worksheets imported from a database. When I
check the format of the cells, they show up as Number with 2 decimal places.
BUT when I try to sum the values in a column it sums to zero (the values are
non-zero). If I try to add two cells in the range I get a #VALUE error.
Also, when I try to use the sum function from the tool bar, it does not
automatically populate any range.

It's acting like the cells are text, but the format says that they are text.
When I try top convert them to numbers:
1) there is no ! area that says they are text
2) when I use the "paste-special-multiply" to try to convert text to
numbers, I still get 0 as a result

ANY IDEAS/SUGGESTIONS?


The format of a cell does not directly give you information as to whether the
contents are TEXT or NUMBER. One way to detect that is with the
ISTEXT(cell_ref) function.

If the data is coming via the WEB, the most common cause for the behavior you
describe is the addition of a non-break space at the end of the number. This
is CHAR(160). To "clean up" the data, you could try this formula:

=--SUBSTITUTE(TRIM(A1),CHAR(160),"")

If that doesn't do it, by using the MID function you can step through the
contents of the cell one character at a time, and see exactly what you have.

For example, with A1 containing the number 23, followed by the no-break space,
do the following:

B1: =MID($A$1,ROW(),1)
C1: =CODE(MID($A$1,ROW(),1))

Select B1 & C1 and copy/drag down to row 4.

You should see the following:

2 50
3 51
* 160
#VALUE!

A similar strategy will let you analyze what's going on with your cells.

HTH,
--ron


 
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
substracting numbers in non contigous cells Guillermo Padrón Excel Discussion (Misc queries) 5 April 10th 05 01:29 PM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 12:44 AM
Converting negative numbers in a range of cells to zero Dede Excel Discussion (Misc queries) 3 January 14th 05 06:23 PM
Calculating without including Hidden Cells LiquidFire Excel Discussion (Misc queries) 3 November 29th 04 08:35 PM
combining several individual cells of numbers into one cell Jeanne Excel Worksheet Functions 5 November 24th 04 12:31 PM


All times are GMT +1. The time now is 12:25 AM.

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"