ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   averageif cell doesn't contain "text" (https://www.excelbanter.com/excel-worksheet-functions/446593-averageif-cell-doesnt-contain-text.html)

dkte737

averageif cell doesn't contain "text"
 
Hello, I have some data below I want to average but only if Column B does not have "DAL". I had =averageif(b:b,<"DAL",J:J) but it doesn't like it. Any help?

Column B
CPS
CPS
CPS
DAL
GVT
DAL
MRY
DAL



Column J
435
783
0
276
0
1792
200
276

Claus Busch

averageif cell doesn't contain "text"
 
Hi,

Am Wed, 18 Jul 2012 04:57:03 +0000 schrieb dkte737:

Hello, I have some data below I want to average but only if Column B
does not have "DAL". I had =averageif(b:b,<"DAL",J:J) but it doesn't
like it. Any help?


try:
=AVERAGEIF(B:B,"<DAL",J:J)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Spencer101

Quote:

Originally Posted by dkte737 (Post 1603737)
Hello, I have some data below I want to average but only if Column B does not have "DAL". I had =averageif(b:b,<"DAL",J:J) but it doesn't like it. Any help?

Column B
CPS
CPS
CPS
DAL
GVT
DAL
MRY
DAL



Column J
435
783
0
276
0
1792
200
276

Hi, try moving the first quote mark to before the < rather than after it.

=averageif(b:b,"<DAL",J:J)

dkte737

Quote:

Originally Posted by Spencer101 (Post 1603740)
Hi, try moving the first quote mark to before the < rather than after it.

=averageif(b:b,"<DAL",J:J)

Thank you!

Now I realized to get a good weighted average, I need to multiply J:J by its price in H:H, then take the average, but how do I do that?



Column B
Location
CPS
CPS
CPS
DAL
GVT
DAL
MRY
DAL
PHX


Column H
Fuel Purchased
435
783
0
276
0
1792
200
276
300


Column J
Fuel Price



4.21

4.34
6.34

4.24


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com