Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Averaging miles per gallon

I have a yearly truck inventory that I have set up to average the yearly mpg
of fuel used. However, I have blank cells - as I keep these records for the
year - How can I leave blank cells out of averaging?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 124
Default Averaging miles per gallon

Blanks should not be counted in an AVERAGE or SUM function. What will throw
off your average is zero (0) values. If that is what you mean, you would
need to either use an array-entered function or a workaround...

=AVERAGE(IF(A1:A10<0,A1:A10))
(Confirm with Ctrl + Shift + Enter, as it is an array formula.)

... or ..

=SUMPRODUCT(--(A1:A10<0),A1:A10)/COUNTIF(A1:A10,"<0")

Ensure your ranges are set to desired and all are the same size.

HTH

--
Zack Barresse




"TckyTina" wrote in message
...
I have a yearly truck inventory that I have set up to average the yearly
mpg
of fuel used. However, I have blank cells - as I keep these records for
the
year - How can I leave blank cells out of averaging?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Averaging miles per gallon

Probably better to use

=AVERAGE(IF(A1:A10<"",A1:A10))

in this case it probably won't matter but zero is a valid number in an
average


--


Regards,


Peo Sjoblom


"Zack Barresse" wrote in message
...
Blanks should not be counted in an AVERAGE or SUM function. What will
throw off your average is zero (0) values. If that is what you mean, you
would need to either use an array-entered function or a workaround...

=AVERAGE(IF(A1:A10<0,A1:A10))
(Confirm with Ctrl + Shift + Enter, as it is an array formula.)

.. or ..

=SUMPRODUCT(--(A1:A10<0),A1:A10)/COUNTIF(A1:A10,"<0")

Ensure your ranges are set to desired and all are the same size.

HTH

--
Zack Barresse




"TckyTina" wrote in message
...
I have a yearly truck inventory that I have set up to average the yearly
mpg
of fuel used. However, I have blank cells - as I keep these records for
the
year - How can I leave blank cells out of averaging?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 124
Default Averaging miles per gallon

True, if the zeros are actually valid in the data set. Guess I was
understanding that it wasn't valid. An assumption on my part. Thanks for
pointing out though Peo. :)

--
Zack Barresse



"Peo Sjoblom" wrote in message
...
Probably better to use

=AVERAGE(IF(A1:A10<"",A1:A10))

in this case it probably won't matter but zero is a valid number in an
average


--


Regards,


Peo Sjoblom


"Zack Barresse" wrote in message
...
Blanks should not be counted in an AVERAGE or SUM function. What will
throw off your average is zero (0) values. If that is what you mean, you
would need to either use an array-entered function or a workaround...

=AVERAGE(IF(A1:A10<0,A1:A10))
(Confirm with Ctrl + Shift + Enter, as it is an array formula.)

.. or ..

=SUMPRODUCT(--(A1:A10<0),A1:A10)/COUNTIF(A1:A10,"<0")

Ensure your ranges are set to desired and all are the same size.

HTH

--
Zack Barresse




"TckyTina" wrote in message
...
I have a yearly truck inventory that I have set up to average the yearly
mpg
of fuel used. However, I have blank cells - as I keep these records for
the
year - How can I leave blank cells out of averaging?





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
How do I setup a worksheet to track gas mileage/gallon? billymick New Users to Excel 2 August 30th 07 04:48 PM
Miles Per Hour WalkerDude999 Excel Worksheet Functions 1 May 7th 06 09:42 AM
Convert litres per 100km to miles per gallon easily Ann Cardus Excel Discussion (Misc queries) 4 August 16th 05 03:39 PM
convert 1.2 miles to meters crlathem Excel Discussion (Misc queries) 4 August 4th 05 10:47 AM
excel to figure miles per gallon Terri New Users to Excel 5 January 9th 05 06:59 PM


All times are GMT +1. The time now is 08:12 PM.

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"