Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luna Saisho
 
Posts: n/a
Default Averaging a column with 0's

Hiya!

I've been tasked to fix a spreadsheet that has a few issues. I've fixed
most of what I need, but I have a problem I'm wondering if anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column of times.
The problem is that until a truck has come to pick up the load, the times are
all 0:00, and from what I know, it's averaging those zeros. Does anyone know
how to adapt the averaging forumula (which is currently =AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Averaging a column with 0's

=AVERAGE(IF(O38:O167<0,O38:O167))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Luna Saisho" wrote in message
...
Hiya!

I've been tasked to fix a spreadsheet that has a few issues. I've fixed
most of what I need, but I have a problem I'm wondering if anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column of times.
The problem is that until a truck has come to pick up the load, the times

are
all 0:00, and from what I know, it's averaging those zeros. Does anyone

know
how to adapt the averaging forumula (which is currently

=AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Averaging a column with 0's

The following array formula will exclude zeros from the
AVERAGE.of the numbers in A1:A10.

=AVERAGE(IF(A1:A10<0,A1:A10,FALSE))

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first enter the formula and
whenever you edit it later. If you do this properly, Excel will
display the formula enclosed in curly braces {} in the formula
bar.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Luna Saisho" wrote in
message
...
Hiya!

I've been tasked to fix a spreadsheet that has a few issues.
I've fixed
most of what I need, but I have a problem I'm wondering if
anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column
of times.
The problem is that until a truck has come to pick up the load,
the times are
all 0:00, and from what I know, it's averaging those zeros.
Does anyone know
how to adapt the averaging forumula (which is currently
=AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Averaging a column with 0's

If the truck has not yet arrived, then leave the cell blank rather than zero.
AVERAGE() will ignore blanks.
--
Gary's Student


"Luna Saisho" wrote:

Hiya!

I've been tasked to fix a spreadsheet that has a few issues. I've fixed
most of what I need, but I have a problem I'm wondering if anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column of times.
The problem is that until a truck has come to pick up the load, the times are
all 0:00, and from what I know, it's averaging those zeros. Does anyone know
how to adapt the averaging forumula (which is currently =AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Averaging a column with 0's

One mo
=sum(o38:o167)/countif(o38:o167,"<"&0)

As long as you always have some sort of numbers in that range.

Luna Saisho wrote:

Hiya!

I've been tasked to fix a spreadsheet that has a few issues. I've fixed
most of what I need, but I have a problem I'm wondering if anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column of times.
The problem is that until a truck has come to pick up the load, the times are
all 0:00, and from what I know, it's averaging those zeros. Does anyone know
how to adapt the averaging forumula (which is currently =AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luna Saisho
 
Posts: n/a
Default Averaging a column with 0's

Wow! I go have something to eat and four responses! Thank you to all!

Unfortunately, leaving the space blank would be too easy for something I
generally have to work on. ^_^ That number is there by result of checking
the time the truck starts to be loaded and when it leaves.

CTRL+SHIFT+ENTER is no problem, but I have yet to hear about an array
forumula... I'm going to have to research this, as I think I might be missing
something big.

BTW, it seems to work great! I didn't get any {}'s, however.

Thanks again!
Steph

"Dave Peterson" wrote:

One mo
=sum(o38:o167)/countif(o38:o167,"<"&0)

As long as you always have some sort of numbers in that range.

Luna Saisho wrote:

Hiya!

I've been tasked to fix a spreadsheet that has a few issues. I've fixed
most of what I need, but I have a problem I'm wondering if anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall column of times.
The problem is that until a truck has come to pick up the load, the times are
all 0:00, and from what I know, it's averaging those zeros. Does anyone know
how to adapt the averaging forumula (which is currently =AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Averaging a column with 0's

Array formulas are a powerful tool in Excel. See
http://www.cpearson.com/excel/array.htm for some details and
examples.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Luna Saisho" wrote in
message
...
Wow! I go have something to eat and four responses! Thank you
to all!

Unfortunately, leaving the space blank would be too easy for
something I
generally have to work on. ^_^ That number is there by result
of checking
the time the truck starts to be loaded and when it leaves.

CTRL+SHIFT+ENTER is no problem, but I have yet to hear about an
array
forumula... I'm going to have to research this, as I think I
might be missing
something big.

BTW, it seems to work great! I didn't get any {}'s, however.

Thanks again!
Steph

"Dave Peterson" wrote:

One mo
=sum(o38:o167)/countif(o38:o167,"<"&0)

As long as you always have some sort of numbers in that range.

Luna Saisho wrote:

Hiya!

I've been tasked to fix a spreadsheet that has a few issues.
I've fixed
most of what I need, but I have a problem I'm wondering if
anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall
column of times.
The problem is that until a truck has come to pick up the
load, the times are
all 0:00, and from what I know, it's averaging those zeros.
Does anyone know
how to adapt the averaging forumula (which is currently
=AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luna Saisho
 
Posts: n/a
Default Averaging a column with 0's

What a strange coincidence that the domain name and your name are so similar!
;)

Seriously, you wrote a fantastic page that is going to help me write some
great add-ons for what I'm working on. It'll be nice to give this back to
them not only fixed, but improved.

Thanks again! ^_^
Steph

"Chip Pearson" wrote:

Array formulas are a powerful tool in Excel. See
http://www.cpearson.com/excel/array.htm for some details and
examples.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Luna Saisho" wrote in
message
...
Wow! I go have something to eat and four responses! Thank you
to all!

Unfortunately, leaving the space blank would be too easy for
something I
generally have to work on. ^_^ That number is there by result
of checking
the time the truck starts to be loaded and when it leaves.

CTRL+SHIFT+ENTER is no problem, but I have yet to hear about an
array
forumula... I'm going to have to research this, as I think I
might be missing
something big.

BTW, it seems to work great! I didn't get any {}'s, however.

Thanks again!
Steph

"Dave Peterson" wrote:

One mo
=sum(o38:o167)/countif(o38:o167,"<"&0)

As long as you always have some sort of numbers in that range.

Luna Saisho wrote:

Hiya!

I've been tasked to fix a spreadsheet that has a few issues.
I've fixed
most of what I need, but I have a problem I'm wondering if
anyone has a
solution to. :)

Basically, it needs to find an average of a rather tall
column of times.
The problem is that until a truck has come to pick up the
load, the times are
all 0:00, and from what I know, it's averaging those zeros.
Does anyone know
how to adapt the averaging forumula (which is currently
=AVERAGE(O38:O167))
to forget about the zero'd times?

Thanks!!
Steph

--

Dave Peterson




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
Column picked randomly with probability relative to number of entr Neil Goldwasser Excel Worksheet Functions 4 May 30th 06 08:55 AM
how can i multiply two columns edgar Excel Worksheet Functions 7 March 2nd 06 03:29 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


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