Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Average Length of Stay

Column A is Funding Source: "A" or "T"
Column B is Days of Stay calculated from check-out date minus check-in date.
How to calculate Column C as Average Length of Stay for "A"s?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Average Length of Stay

Hi,

Try this

=sumproduct((A2:A150="A")*(B2:B150))/countif(A2:A150,"A")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Georgeb123" wrote in message
...
Column A is Funding Source: "A" or "T"
Column B is Days of Stay calculated from check-out date minus check-in
date.
How to calculate Column C as Average Length of Stay for "A"s?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default Average Length of Stay

=SUMIF(A1:A26,"A",B1:B26)/COUNTIF(A1:A26,"A")
or, if you have Excel 2007+
=AVERAGEIF(A1:A26,"A",B1:B26)
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Georgeb123" wrote in message
...
Column A is Funding Source: "A" or "T"
Column B is Days of Stay calculated from check-out date minus check-in
date.
How to calculate Column C as Average Length of Stay for "A"s?


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
Calculating Average Length of Service EasyPeasy Excel Worksheet Functions 3 May 17th 23 07:44 PM
Trying to calculate average call length pilates_jocelyn Excel Worksheet Functions 7 April 22nd 23 09:02 AM
Setting the Length of Time a File Can Stay Open MDS Excel Discussion (Misc queries) 1 January 22nd 09 07:12 PM
Calculate average of ratings as a function of length rodeo Excel Worksheet Functions 2 November 2nd 07 01:44 PM
Validation length, Range length I think I need to rephrase the question Excel Discussion (Misc queries) 5 September 17th 07 06:29 AM


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