View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Dave Peterson
 
Posts: n/a
Default pivot table help

Are those "numbers" really numbers?

Try this in a couple of empty cells:

=counta(a2:a9999)
=count(a2:a9999)

Adjust the range to point at the field you want averaged.

The =counta() will count the number of non-empty cells.
The =count() will count the number of cells with real numbers in them.

If that =count() returns 0, then your numbers aren't numbers. They're really
text.

One way to fix this is to:
select an empty cell
edit|copy
select the offending range
edit|paste special|add

(But this is just a guess.)

If the "numbers" came from a web page, you may have some of those HTML
non-breaking spaces (char(160)) in the cells.

David McRitchie has a macro that cleans up this kind of stuff:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()"

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

evg1 wrote:

I don't have errors in the raw data, I am taking a spreadsheet of a
couple of columns - some have numbers, some are blanks - then putting
into a pivot table (count of ...) but when I try to have it changed to
get averages, etc. It doesn't work

BL-DLY (4P) BL-POD (3P) Count of BL-DLY (4P) Count of Dwell Time at
POD Count of Dwell Time POD to Rail Departure
COLLEGE PARK, GA CHARLESTON, SC 11 11 11
LOS ANGELES, CA 2 2 2
SAVANNAH, GA 7 7 7
COLLEGE PARK, GA Total 20 20 20
DALLAS, TX LOS ANGELES, CA 10 10 10
DALLAS, TX Total 10 10 10
LANGLEY, BC VANCOUVER, BC 1 1 1
LANGLEY, BC Total 1 1 1
MIRA LOMA, CA LOS ANGELES, CA 66 66 66
MIRA LOMA, CA Total 66 66 66
MONROE TOWNSHIP, NJ NEW YORK, NY 57 57 57
MONROE TOWNSHIP, NJ Total 57 57 57

--
evg1
------------------------------------------------------------------------
evg1's Profile: http://www.excelforum.com/member.php...o&userid=35043
View this thread: http://www.excelforum.com/showthread...hreadid=547887


--

Dave Peterson