imbalize
imbalize

Reputation: 41

Excel - count a specific value based on a part of another cell

I thought this would be a no brainer. But I really need help to solve it.

I have a row of dates: 10 july 2020, 11 july 2020 and so on (Swedish excel). Below each date are strings for example "FP". I wish to achieve a counter for each "FP" that is below a specific month of a year, such as july 2020.

The way I approached this was with

=COUNTIFS(G1:UG1;"*july 2020";G2:UG2;"FP")

However the * doesn't do what I want it to. Is there another way to do this?

Please help! :)

Upvotes: 1

Views: 36

Answers (1)

Scott Craner
Scott Craner

Reputation: 152450

The dates are true dates and as such the july 2020 is just a format of a number and not actually there.

Instead BookEnd the date:

=COUNTIFS(G1:UG1;">="&DATE(2020;7;1);G1:UG1;"<"&DATE(2020;8;1);G2:UG2;"FP")

Upvotes: 2

Related Questions