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

Time:09-13

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.

CodePudding user response:

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

  • Related