A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Average Length of Stay



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 02:14 PM posted to microsoft.public.excel.worksheet.functions
Georgeb123
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  
Old May 11th, 2010, 02:24 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
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  
Old May 11th, 2010, 02:31 PM posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
external usenet poster
 
Posts: 516
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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.