# Will a COUNTSIFS work for me ?

1. ## Will a COUNTSIFS work for me ?

Hoping someone can help on this one,

The below sample is Job Ref numbers which I need to count at different times from month to month as our year progresses

For example, If I wanted to count all the shifts between a certain date range. I think the problem is that my dates are going across in a row and not a column. ??
I need to have it going this way as this data eventually is for a full year of work.

There is 2 tabs, what I currently have, and what I'm trying to get working

Have a look and see what you think...

Thanks,
Paul

2. ## Re: Will a COUNTSIFS work for me ?

Originally Posted by paul0872829332
I think the problem is that my dates are going across in a row and not a column
Yes. From the COUNTIFS support page: ``Each additional range must have the same number of rows and columns as the criteria_range1 argument``.

You can use SUMPRODUCT as follows, entered into P27 and copied down the column. But you have other mistakes, which I've corrected and highlighted in red.

=SUMPRODUCT((\$A\$2:\$Q\$2>=\$O\$25)*(\$A\$2:\$Q\$2<=\$P\$25)*(\$A\$6:\$Q\$19=O27))

In addition to flipping your use of ``<=`` and ``>=``, also note the need to use absolute references to \$O\$25 and \$P\$25.

PS.... Alternatively, use O\$25 and P\$25 if you might additional pairs of dates, e.g. in Q25:R25, S25:T25, etc.

3. ## Re: Will a COUNTSIFS work for me ?

Welcome to the forum.

Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1