Countifs formula based on multiple criteria and a date less than today

Hello again,

I do have one more question for you....In this formula:
=IFERROR(IF(OR(INDEX(Sheet2!$K$2:$K$138,MATCH(B2,Sheet2!$C$2:$C$138,0))="",-7),1,0),0)

How do I have it calculate ONLY if the cell in Sheet 2 column K is blank and it's been more than 7 days? So once a date is entered in column K (even if it's after 7 days) it no longer will total?
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Not sure if I'm reading the information correctly, see if this does it.

=IFERROR(IF((INDEX(Sheet2!$K$2:$K$138,MATCH(B2,Sheet2!$C$2:$C$138,0))-TODAY())<7,1,0),0)

As you said 'Sheet 2 column K is blank' I've assumed formulas that show a blank using "". If column K is empty then the results will most likely be wrong.
 
Upvote 0
Thank you for your help. That didn't work though :( It actually counted everyone.

What I'm looking for is a formula that only calculates the more than 7 days until there is a date entered.

So if we are on the Enrollment tab, look at column G, this column should only count a total if no date appears in So the formula is looking at Sheet 2, Column G:

=IFERROR(IF(OR(INDEX(Sheet2!$J$2:$J$18,MATCH(B2,Sheet2!$C$2:$C$18,0))="",INDEX(Sheet2!$J$2:$J$18,MATCH(B2,Sheet2!$C$2:$C$18,0))-7 > A2),1,0),0)

It’s comparing the date in Enrollment tab, Column A to Sheet 2, Column J. It’s looking to see if there’s a date past 7 days in there. What I need, though, is it only to look if there’s a date past 7 days if 1) in Sheet 2 there’s an ID number in Column C, 2) there’s nothing entered in Sheet 2, Column J, and 3) if it’s been longer than 7 days based on the date in Enrollment tab, Column A.

I can probably modify the other formulas in the Enrollment tabs J and M once I know how to do this, but for everything, I need it not to calculate any longer once a date is entered.

Does this help?

Thank you again!!!
 
Upvote 0
There's something in there that is just not clicking into place with me, it would be easier to follow if you could upload another sample file, perhaps highlight the entries that should be counted, that should make it a bit clearer.
 
Upvote 0
For some silly reason the proverbial penny is still not dropping, looking at the enrolment tab it looks like the formulas that you already have are giving you the results that you're asking for.

The 2 records that your notes say are blank in column J of sheet 2 are not blank, however they are blank in column K which could be leading to some confusion.
 
Upvote 0
Oh my goodness....It's not the proverbial penny....It's me :( I think I got myself confused. Can you take another look at the doc? I think I've figured out how to word it. So sorry!!!
 
Upvote 0
I'm still confused, with the date missing in sheet 2, there is nothing to compare to the date in column A to establish if it is more than 7 days.

I thought that you might want 7 days from the current date, but the examples are only 4 days and 2 days?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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