Hey everyone,
Here's my problem: I need to use COUNTIFS to count if pieces of equipment have had maintainence done after a specific date, and what class it is (T1/T2/T3).
Constraints: I want the date to be entered in a cell by the user.
Here's the formula I'm attempting to use, but it keeps coming up as zero. If I break the formula into two COUNTIF statements (splitting each statement into it's own cell), I positive numbers (which is ideal). When combining, I get zero...
Main Formula (results in zero):
=COUNTIFS('Transformer Oil'!H:H,">="&Calculations!O32,'Transformer Oil'!D:D,"T1")
Two Seperate Formulas (results in positive whole numbers [Good!])
=COUNTIF('Transformer Oil'!H:H,">="&Calculations!O32)
=COUNTIF('Transformer Oil'!D:D,"T1")
Does combining COUNTIF statements into a single COUNTIFS, when there is date formatting, automatically make it zero? I can't figure this one out... Thanks in advance!
Are you sure the dates >= Calculations!O32 are lining up with the "T1" in same rows? If they are, then it should work as you have shown.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Countifs look BOTH criteria at the same time...
Count how many 5's in each column in case:
Will result 2.5 2 3 5
COUNTIFS will result 0 (there are no 5's in both column at the same time).
"Relax. What is mind? No matter. What is matter? Never mind!"
NBVC and zbor, you guys nailed it. You guys were right. I had thought they were in the exact same rows, but they are offset by one. I was confused because the T1 column is merged every two vertical cells, but they start 1 row higher than the dates.
Here's an example, assume T1 is merged for 2 rows at a time. (X refers to another description).
T1.........X
.............Date
T1.........X
.............Date
So, here poses another question. What function would be able to check if that piece of equipment is T1, and maintenance occurred after specified date, assuming they are offset by each row? Thanks in advance!
Move range for one row...
But you can't use whole column for that.
So, for instance, instead of:
=COUNTIFS('Transformer Oil'!$H$1:$H$1000,">="&Calculations!O32,'Transformer Oil'!$D$1:$D$1000,"T1")
use
=COUNTIFS('Transformer Oil'!$H$1:$H$1000,">="&Calculations!O32,'Transformer Oil'!$D$2:$D$1001,"T1")
"Relax. What is mind? No matter. What is matter? Never mind!"
Zbor, thanks again. I definitly appreciate your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks