ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Count IF Multipile Formulas (https://www.excelbanter.com/new-users-excel/32086-count-if-multipile-formulas.html)

andreah

Count IF Multipile Formulas
 
How do I count occurrences of multiple values by using the Count If formula.
The help page stated that I could assisgn a value of 1 with IF functions but
I don't know how to do this. I have three columns, one with cost, one with
number of people and one with airline. I want to count the cost and the
number of people for each airline, and group some airlines together. E.g.
cost and number of people for airline 1 and airline two. Cost and number of
people for airline not specified. Any ideas? Thanks Andrea

Bob Phillips

Can' use COUNTIF

=SUMPRODUCT(--(A2:A100="value1"),--(B2:B100=17))

to sum use

=SUMPRODUCT(--(A2:A100="value1"),--(B2:B100=17),C2:C100)

--
HTH

Bob Phillips

"andreah" wrote in message
...
How do I count occurrences of multiple values by using the Count If

formula.
The help page stated that I could assisgn a value of 1 with IF functions

but
I don't know how to do this. I have three columns, one with cost, one

with
number of people and one with airline. I want to count the cost and the
number of people for each airline, and group some airlines together. E.g.
cost and number of people for airline 1 and airline two. Cost and number

of
people for airline not specified. Any ideas? Thanks Andrea




Don Guillett

try where col b is people
=sumproduct((a2:a22={"airline1","airline2"})*(b2:b 22))

--
Don Guillett
SalesAid Software

"andreah" wrote in message
...
How do I count occurrences of multiple values by using the Count If

formula.
The help page stated that I could assisgn a value of 1 with IF functions

but
I don't know how to do this. I have three columns, one with cost, one

with
number of people and one with airline. I want to count the cost and the
number of people for each airline, and group some airlines together. E.g.
cost and number of people for airline 1 and airline two. Cost and number

of
people for airline not specified. Any ideas? Thanks Andrea





All times are GMT +1. The time now is 02:43 PM.

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