Incrementing a calculated cell by if it meets a set of criteria

furness121

New Member
Joined
Jan 24, 2024
Messages
5
Office Version
  1. 2021
Platform
  1. Windows
Hi,
I am trying to create an attendance streaks set of data.
I have columns with how many sessions a student has attended that week (10 is maximum)

I need to have a column that runs a current total that increments by 10 if a student has attended all week but it needs to increment the original value in the cell

e.g if Week 18 = 10, then increment current total (held in the cell) by 10 otherwise set it back to 0 as they have missed a day and there streak needs to start again

It is telling me that it cannot create a circular reference - does anyone know a way around it?

I have attached a picture with the data I need in that cell from the numbers visible - I've tried using a variety of different functions but cannot get it to increment!

Thanks :)
 

Attachments

  • Picture1.png
    Picture1.png
    101.3 KB · Views: 7

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You can't have a two different "things" in a cell (1 formula and 1 value, 2 values, or 2 formulas) at the same time.
You could do what you ask with VBA.

My question is how do you know what week is current? If you have that you may be able to work backwards to get one formula to get your solution.

Also, Mr. Excel has a tool called xl2bb add in (link below) that allows users to share mini worksheets of their workbook. Please use that to post your data. If you are unable to use that, then please post your data as a table. Expected results (multiple scenarios) are always extremely healthy!
 
Upvote 0
Thank you for your reply - I had used offset to move the column along each week (manually change the column number in the offset)

Attendance data.xlsx
ABCDEFGHIJKLMNOPQRST
1NameRegWeek 8Week 9Week 10Week 11Week 12Week 13Week 14Week 15Half termWeek 16Week 17Week 18Week 19Week 20Rolling totalCurrent TotalCurrent Streak
2Possible sessions attendend101010101081041010101010122
3Student 1101010101081031041010101150
4Student 2101010101081041010101010122
5Student 34101010108104101010108114
6Student 4107510106104104101010106
7Student 510108101081026108810110
8Student 691010101081041010444103
9
Sheet1
Cell Formulas
RangeFormula
S3S3=IF(OFFSET(A2,1,13)=10,S3+10,0)
R2:R8R2=SUM(C2:P2)
 
Upvote 0
Thank you for your reply - I had used offset to move the column along each week (manually change the column number in the offset)

What do you mean manually, each week you would change your formulas? Do you have any kind of date or progress counter?
Or maybe a list of "Number of Weeks Completed/Processed"?
 
Upvote 0
A new column will be added each week and then I would change the offset column from say 13 to 14 so it looks up the most recent.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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