Zero all cells before the next entry if greater then 120days

Tazzbjs

New Member
Joined
Nov 2, 2011
Messages
37
Ok, I am stuck. I have an attendance tracker that I am trying to add a "clean slate" into my formula. I have the following formula in D6 (down),
Excel Formula:
=IFERROR(IF(F6<=0,"",VLOOKUP(C6,'Attendance Lang'!$A$2:$C$9,3,FALSE)),"")
. So currently, D6 (down) will change to 0 at 12 months. I need to add another qualifier, that will return "0" in all cells above a new entry if it has been 120 days or more. For example, row 13 to row 14 is greater than 120 days, so rows 6 thru row 13 need to be "0". Thank-you all in advance for your help.

1710886927652.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
in cell g6, how about =if(max($f$6:$f$14)>119,0,f6) copy formula g6 to g14. then instead of your formula pointing to f6, have it point to g6. cheers!
 
Upvote 0
in cell g6, how about =if(max($f$6:$f$14)>119,0,f6) copy formula g6 to g14. then instead of your formula pointing to f6, have it point to g6. cheers!
Looks like that is just returning "0" if any of the cells are greater than 119. What I need is a bit more complicated than that. Essentially the policy is a point (column D) falls off after 12 months, so is "0". In addition to that, they are eligible for a "clean slate" if they go 4 months with out accruing another point. The clean slate then zeros "0" all points accrued before the date of the new entry.
 
Upvote 0
hi, can you paste the data here? it be a lot easier to work with than the image above. you can copy, then paste like this. this is an example from something i'm working on.
a1
two business days, not including the day it was received
mtwrfsnmtwrfsn
=now()+2mxxxx
=now()+2txxxx
=now()+2wxxxx
=now()+4rxxxxxx
=now()+4fxxxxxx
=now()+3sxxxxx
=now()+2nxxxx
 
Upvote 0
Looks like that is just returning "0" if any of the cells are greater than 119. What I need is a bit more complicated than that. Essentially the policy is a point (column D) falls off after 12 months, so is "0". In addition to that, they are eligible for a "clean slate" if they go 4 months without accruing another point. The clean slate then zeros "0" all points accrued before the date of the new entry.
Ok, I added a formula in column G
Excel Formula:
=IF(B14-B13>119,"",F13)
that returns "0" and used several IF statements to make it work.

DATECATEGORYPOINT(s)PURGE DATE
4/5/2023D04/5/2024
4/6/2023D04/6/2024
4/7/2023D04/7/2024
4/10/2023D04/10/2024
6/14/2023D06/14/2024
6/15/2023D06/15/2024
8/2/2023G08/2/2024
8/3/2023G08/3/2024
2/24/2024D12/24/2025

DATECATEGORYPOINT(s)PURGE DATEDay left to purge
45021D=IFERROR(IF(D7=0,0,IF(G6<=0,0,IF(F6<=0,"",VLOOKUP(C6,'Attendance Lang'!$A$2:$C$9,3,FALSE)))),"")=IF(B6>0,B6+366,"")=IF(B6,E6-$AA$1,"")=IF(B7-B6>119,0,F6)
45022D=IFERROR(IF(D8=0,0,IF(G7<=0,0,IF(F7<=0,"",VLOOKUP(C7,'Attendance Lang'!$A$2:$C$9,3,FALSE)))),"")=IF(B7>0,B7+366,"")=IF(B7,E7-$AA$1,"")=IF(B8-B7>119,0,F7)
45023D=IFERROR(IF(D9=0,0,IF(G8<=0,0,IF(F8<=0,"",VLOOKUP(C8,'Attendance Lang'!$A$2:$C$9,3,FALSE)))),"")=IF(B8>0,B8+366,"")=IF(B8,E8-$AA$1,"")=IF(B9-B8>119,0,F8)
45026D=IFERROR(IF(D10=0,0,IF(G9<=0,0,IF(F9<=0,"",VLOOKUP(C9,'Attendance Lang'!$A$2:$C$9,3,FALSE)))),"")=IF(B9>0,B9+366,"")=IF(B9,E9-$AA$1,"")=IF(B10-B9>119,0,F9)
 
Upvote 0
Solution
good for you. glad you figured it out. an idea for future work, instead of trying to use a huge formula in one column or one cell, break up the formula into multiple cells or columns, that way, it is much easier to see your result for each question asked in each cell. cheers!
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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