Excel help please - countif formulas!
Discussion
Hi all,
I'm a bit stumped over a formula in Excel. I have a spreadsheet monitoring turnaround time, and I'm trying to add a field for requests completed within a certain time period.
In my spreadsheet, column I contains the number of working days elapsed, and column J contains a Y/N as to whether the query is complete or not yet.
The user fills in the query start date in column H and the working days elapsed then starts ticking. Column I is filled in with the date when the query is completed, which then stops the timer in column I and turns column J into a Y.
I am trying to create a formula that will first check if the query is complete (J=Y), and then count how many rows were completed in 3 or less days. I have tried a nested countif and a countif inside an if statement, but these both fail. Could someone help me please?
I'm on my iPhone as ph is blocked at work (noooo) but I'll try and provide as much info as I can.
I'm a bit stumped over a formula in Excel. I have a spreadsheet monitoring turnaround time, and I'm trying to add a field for requests completed within a certain time period.
In my spreadsheet, column I contains the number of working days elapsed, and column J contains a Y/N as to whether the query is complete or not yet.
The user fills in the query start date in column H and the working days elapsed then starts ticking. Column I is filled in with the date when the query is completed, which then stops the timer in column I and turns column J into a Y.
I am trying to create a formula that will first check if the query is complete (J=Y), and then count how many rows were completed in 3 or less days. I have tried a nested countif and a countif inside an if statement, but these both fail. Could someone help me please?
I'm on my iPhone as ph is blocked at work (noooo) but I'll try and provide as much info as I can.
I'm a little confused as to what's in column I (completed date or number of days query has been open/ for query to be complete?) but either way, what I'd look to do is have a column showing days between open and completion (if you haven't already - it should be a simple formula of closed date - opened date) and then do a countif on this (i.e. countif([insert cell range here],"<=3") - I hope that makes sense?
Edited by Ultuous on Thursday 13th May 10:25
Thanks for your response!
Column I contains the following formula:
=IF(G3="","",IF(H3="",NETWORKDAYS(G3,NOW()),NETWORKDAYS(G6,H6)))
Basically the column checks if column G (start date) is empty - if it is, it'll stay blank. If it has a date in it, it will check column H (cleared date). If the query has been cleared, it will calculate the length between the start date (G) and the end date (H). If it's not cleared yet, it calculates how
many days have passed from
the start date until now.
Column J is very similar:
=IF(G6="","",IF(H6="","N","Y"))
Same principle - blank start date means the cell stays blank. If there is a date in the completed field, it displays a Y. If not, an N.
The problem I am having with the formula you've posted is that it also counts open queries, where it should
only count closed ones. I've remedied it temporarily by having a hidden column that copies the complete query times only, and I can then countif that, although it's a bit untidy. Seeing as this spreadsheet is going to our subcontractors and possibly customers, I'd like to make it as flash as possible
Thanks for your support though!
Column I contains the following formula:
=IF(G3="","",IF(H3="",NETWORKDAYS(G3,NOW()),NETWORKDAYS(G6,H6)))
Basically the column checks if column G (start date) is empty - if it is, it'll stay blank. If it has a date in it, it will check column H (cleared date). If the query has been cleared, it will calculate the length between the start date (G) and the end date (H). If it's not cleared yet, it calculates how
many days have passed from
the start date until now.
Column J is very similar:
=IF(G6="","",IF(H6="","N","Y"))
Same principle - blank start date means the cell stays blank. If there is a date in the completed field, it displays a Y. If not, an N.
The problem I am having with the formula you've posted is that it also counts open queries, where it should
only count closed ones. I've remedied it temporarily by having a hidden column that copies the complete query times only, and I can then countif that, although it's a bit untidy. Seeing as this spreadsheet is going to our subcontractors and possibly customers, I'd like to make it as flash as possible

Thanks for your support though!
sebhaque said:
The problem I am having with the formula you've posted is that it also counts open queries, where it should only count closed ones. I've remedied it temporarily by having a hidden column that copies the complete query times only, and I can then countif that, although it's a bit untidy. Seeing as this spreadsheet is going to our subcontractors and possibly customers, I'd like to make it as flash as possible 
Thanks for your support though!
Ooops, just noticed the same... you could (I presume?) have an if statement in the calculated cell I've suggested to cure the problem by blanking out any lines without a close date, thus making them exempt from the count - i.e. if(isblank([closed date cell],"",[closed date cell]-[opened date cell])
Thanks for your support though!
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


