Trouble with Countifs formula. Is there significance to where you reference your data?

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
886
Office Version
  1. 365
Platform
  1. Windows
Hello,

I seem to be having trouble with countifs formulas and not understanding why I am getting zero. I want the formula to count how many matches with "On Time", "Early", and "Late" based on the data in U and W (see chart and data example below)

If I make the data on the same sheet as the chart it works:

My formula for column B is: =COUNTIFS($U:$U,$B$1,$W:$W,A2)
My formula for column C is: =COUNTIFS($U:$U,$C$1,$W:$W,A2)
My formula for column D is: =COUNTIFS($U:$U,$D$1,$W:$W,A2)

However as soon as I change it to reference the data on another sheet it gives me a result of 0:

My formula for column B is:=COUNTIFS('Time Tracker'!$U:$U,$B$1,'Time Tracker'!$W:$W,A2)

Here is my chart that will have the formula

ABCD
On TimeEarlyLate
January
February
March
April
May
June
July
August
September
October
November
December

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>


And here is my Data:

UW
EarlyJuly
LateAugust
On TimeAugust
EarlyAugust
EarlySeptember

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>

Note: the Early, Late and On time are determined by formulas as well as the Months.

Any insight would be greatly appreciated as I am stumped

Thank you! :)
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I didn't experience any problem when referring data onto another worksheet... Could you share a sample workbook where the problem exists?

Bye
 
Upvote 0
I do not know how to share a workbook on here.... Sorry still new to using this forum..
 
Upvote 0
You cannot upload files to the site, but you can upload to a share site such as OneDrive, GoogleDrive, DropBox. Mark for sharing & then post the link to the thread.

Are your months just text, or are they dates formatted to just show the month?
 
Upvote 0
Col W is dates not months, try changing the formula to
=TEXT(DATE($V$1,1,-2)-WEEKDAY(DATE($V$1,1,3))+V4*7,"mmmm")
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top