Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
michaelas
 
Posts: n/a
Default Average Function Help Needed


Hi,

I'm trying to calculate average miles in my mileage log.
Col. F = total miles for each day
Col E = destination eg. store, supplyhouse, rec, auto, etc
I want to total all the "rec" miles and average them in a single cell.
Can anyone help? Thanks

Michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile: http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi michaelas,

Try this ARRAY formula (confirm with Ctrl+Shift+Enter, not just Enter!!!):

=AVERAGE(IF((E2:E100="rec")*(F2:F100<""),F2:F100) )

Regards,
KL


"michaelas" wrote
in message ...

Hi,

I'm trying to calculate average miles in my mileage log.
Col. F = total miles for each day
Col E = destination eg. store, supplyhouse, rec, auto, etc
I want to total all the "rec" miles and average them in a single cell.
Can anyone help? Thanks

Michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile:
http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654



  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

A couple of non-array formulas:

Say data list is E2 to F100,
And you enter the destination you're looking to average into G1:

=SUMIF(E2:E100,G1,F2:F100)/COUNTIF(E2:E100,G1)

OR

=SUMPRODUCT((E2:E100=G1)*F2:F100)/COUNTIF(E2:E100,G1)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"michaelas" wrote
in message ...

Hi,

I'm trying to calculate average miles in my mileage log.
Col. F = total miles for each day
Col E = destination eg. store, supplyhouse, rec, auto, etc
I want to total all the "rec" miles and average them in a single cell.
Can anyone help? Thanks

Michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile:

http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654


  #4   Report Post  
BenjieLop
 
Posts: n/a
Default


<< Hi,

I'm trying to calculate average miles in my mileage log.
Col. F = total miles for each day
Col E = destination eg. store, supplyhouse, rec, auto, etc

I want to total all the "rec" miles

=SUMIF(E1:E100,\"REC\",F1:F100)


<< and average them in a single cell.


=SUMIF(E1:E100,\"REC\",F1:F100)/COUNTIF(E1:E100,\"REC\")


Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #5   Report Post  
michaelas
 
Posts: n/a
Default


Thanks BenjieLop for your reply & formula. It worked great!

Can you tell me how would I average all the daily _work_ miles if all
the destinations have different names?

michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile: http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654



  #6   Report Post  
BenjieLop
 
Posts: n/a
Default


michaelas Wrote:
Thanks BenjieLop for your reply & formula. It worked great!

Can you tell me how would I average all the daily _work_ miles if all
the destinations have different names?

michaelas


Just change the "rec" in the formula with the destination of your
choice. I hope I understood your question correctly.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #7   Report Post  
michaelas
 
Posts: n/a
Default


What I want to do is average all the work miles _minus_ the Rec miles.
(Rec - recreation)

eg.
Col A-F:

5-Jul / Tue/ 64522/ 64542/ 20/ John - Meinecke St / Hayward
6-Jul/ Wed/ 64542/ 64562/ 20/ George St. - San Luis
7-Jul/ Thu/ 64562/ 64612/ 50/ John - Murray / Hayward Lumber/ De Cou
8-Jul Fri 64612 64690 78 Creston CA - Peg's deck
9-Jul Sat 64690 64776 86 Creston CA - Peg's deck
10-Jul Sun 64776 64790 14 Rec

I want to total all the work miles and compute the daily average, but
subtract all the rec (recreation) miles. But each work day may have
different names. Can I compute a formula to add up all the miles and
then subtract the Rec miles?

(In this eg. E= daily miles/F=destination. I had them switched around
in my original question - sorry)
Thanks for your help & replies, B. I hope this is clear what I want to
do.

michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile: http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #8   Report Post  
BenjieLop
 
Posts: n/a
Default


To determine the average of your non "rec" entries, simply change "rec"
to "<rec" so your formula will look like this:


=SUMIF(E1:E100,\"<REC\",F1:F100)/COUNTIF(E1:E100,\"<REC\")


Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #9   Report Post  
michaelas
 
Posts: n/a
Default


That did it! Thanks BenjieLop!

michaelas


--
michaelas
------------------------------------------------------------------------
michaelas's Profile: http://www.excelforum.com/member.php...o&userid=26573
View this thread: http://www.excelforum.com/showthread...hreadid=466654

  #10   Report Post  
BenjieLop
 
Posts: n/a
Default


You are welcome... I am just glad that I can help. Thanks for the
feedback.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=466654

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
The sum and average function view all numbers as zero?? darnocnad Excel Discussion (Misc queries) 3 March 15th 10 04:22 PM
Error Handling #N/A with AVERAGE Function - Average of values in Row Sam via OfficeKB.com Excel Worksheet Functions 13 July 31st 05 03:59 PM
average range function Patrick White Excel Worksheet Functions 3 June 30th 05 11:45 AM
average function in Excel 2002 Sherry New Users to Excel 13 May 8th 05 01:49 PM
average if function Darla Excel Worksheet Functions 9 March 4th 05 12:06 AM


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