Changing a value based on data in a previous cell/previous tab - looking back 180 days

PinkyBoco

New Member
Joined
Dec 19, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am trying to set up a spreadsheet for attendance points. I have each employee on a row and the columns are headed with the days/dates of the month. There is a single month per worksheet. I will need the formula to look back 180 days to see if there is a point value on that date, and if so, that value needs to be subtracted from the current date's total points. Is this even possible? I am not an excel master by any means, but have gotten the worksheet built successfully so far!
Attend Image.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
How about something like this?:
All in one sheet. Columns go till end of 2023.

Here you can download the workbook:

Attendance points.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCT
1
2Monthene-23
3ene                              feb                           mar                              
410,250,520,25dolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvi
5TotalATE<TE>NP010203040506070809101112131415161718192021222324252627282930310102030405060708091011121314151617181920212223242526272801020304050607080910111213141516171819202122232425262728293031
6Employee610,250,540,25PTE>TE<NAN
7John Connor4,2520,25-2-NAATE<A
8Walter White------TE<TE>TE>TE>
9Clark Kent------NNNPP
Hoja1
Cell Formulas
RangeFormula
I3:CT3I3=IF(DAY(I5)=1,TEXT(I5,"mmm"),"")
I4:CT4I4=TEXT(I5,"ddd")
C6:C9C6=SUM(D6:H6)
D6:E6D6=SUM((YEAR($I$5:$NI$5)=YEAR($C$2))*(MONTH($I$5:$NI$5)=MONTH($C$2)*($I6:$NI6=D$5)))*D$4
F6:H6,D7:H9F6=SUM((YEAR($I$5:$NI$5)=YEAR($C$2))*(MONTH($I$5:$NI$5)=MONTH($C$2)*($I6:$NI6=F$5)))*F$4
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I4:NI4Expression=DIASEM(I5;2)>5textNO
I5:NI5Expression=ES.IMPAR(MES(I5))textNO
Cells with Data Validation
CellAllowCriteria
C2List=Dates


Attendance points.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCT
1
2Monthene-23
3ene                              feb                           mar                              
410,250,520,25dolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvidolumamijuvi
5TotalATE<TE>NP010203040506070809101112131415161718192021222324252627282930310102030405060708091011121314151617181920212223242526272801020304050607080910111213141516171819202122232425262728293031
6Employee610,250,540,25PTE>TE<NAN
7John Connor4,2520,25-2-NAATE<A
8Walter White------TE<TE>TE>TE>
9Clark Kent------NNNPP
Hoja1
Cell Formulas
RangeFormula
I3:CT3I3=IF(DAY(I5)=1,TEXT(I5,"mmm"),"")
I4:CT4I4=TEXT(I5,"ddd")
C6:C9C6=SUM(D6:H6)
D6:E6D6=SUM((YEAR($I$5:$NI$5)=YEAR($C$2))*(MONTH($I$5:$NI$5)=MONTH($C$2)*($I6:$NI6=D$5)))*D$4
F6:H6,D7:H9F6=SUM((YEAR($I$5:$NI$5)=YEAR($C$2))*(MONTH($I$5:$NI$5)=MONTH($C$2)*($I6:$NI6=F$5)))*F$4
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I4:NI4Expression=DIASEM(I5;2)>5textNO
I5:NI5Expression=ES.IMPAR(MES(I5))textNO
Cells with Data Validation
CellAllowCriteria
C2List=Dates
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
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