ChrisH
ChrisH

Reputation: 15

Query Excel Formula: =IF(MONTH(Data!B:B)=2,COUNTIF(Data!O:O,"*HE (Technical)*"),0)

I am trying to summarise data I have in a table into months Jan,Feb,Mar etc, and need to separate the counts of various strings (such as HE(Technical)).

Some context: column "B" of my Data sheet are dates (not necessarily in chronological order), column "O" are keywords/strings.

I want to sort all instances of a particular string by the month based on the dates inputted in column "B".

May I know how I would go about this? My current formula (in title) only returns zeroes.

Upvotes: 0

Views: 33

Answers (1)

Dominique
Dominique

Reputation: 17491

Instead of working with an =IF(...,CountIf()) construction, you might try to work with a =CountIfS() formula (the IfS gives the opportunity to combine criteria.

For example, I have tried the following formula and the result was quite promising:

=COUNTIFS(B1:B3,2,O1:O3,"*HE*")

Good luck

Upvotes: 0

Related Questions