Reputation: 35
Currently I'm counting absences for a person, and I'm tyring to add a date filter to it. I have a working code to do this.
=COUNTIFS('Old Data'!$A:$A,Tracking!A7,'Old Data'!$B:$B,B5, 'Old Data'!D:D, ">1/1/2012")
The above code works and returns the values I want it to. However, I need to be able to change the date, and year in multiple cells easily. So I created a drop down list in B4 in order to do this easily.
=COUNTIFS('Old Data'!$A:$A,Tracking!A6,'Old Data'!$B:$B,B5, 'Old Data'!D:D, >B4)
Is what I came to logically... but it doesn't work. If you take out the > sign then the cell is referenced, but once you put it in, the cell is no longer referenced. I've been searching for several hours now and can't seem to find anything that will make it work. Any ideas?
Upvotes: 1
Views: 150
Reputation: 290
=COUNTIFS('Old Data'!$A:$A,Tracking!A6,'Old Data'!$B:$B,B5, 'Old Data'!D:D, ">" &B4)
Found this helpful article that should help you with your issue. countifs function
Upvotes: 0
Reputation: 2437
when mixing cell references and operands in IF(S) formulas you must concatenate to build up the string
">"&B4
is what you want
Upvotes: 2