From: Georgeb123 on 11 May 2010 09:14 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?
From: Bernard Liengme on 11 May 2010 09:31 =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" <Georgeb123(a)discussions.microsoft.com> wrote in message news:05EF8838-B3C3-4E5B-B84D-0E96D10BAB6E(a)microsoft.com... > 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?
From: Ashish Mathur on 11 May 2010 09:24 Hi, Try this =sumproduct((A2:A150="A")*(B2:B150))/countif(A2:A150,"A") -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Georgeb123" <Georgeb123(a)discussions.microsoft.com> wrote in message news:05EF8838-B3C3-4E5B-B84D-0E96D10BAB6E(a)microsoft.com... > 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?
|
Pages: 1 Prev: sheet protection with links Next: vlookup across multiple pages |