Compiling from multiple sheets

Eyowzitgoin

New Member
Joined
Mar 15, 2011
Messages
6
:warning:This may be long but I'll try to keep it short.

I'm a teacher who has multiple students coming in for classes at all hours of the week. Some come in for 2 hours one day a week (which counts as 2 classes) and some come in 2 days a week for 1 hour a day and so on. To keep track of this, I've created an attendance workbook with the students names listed under the hour they come in for class. In the cells to the right, I have the date their classes end and in the following columns of the same row,their attendance. The end date can change if they have a valid reason for not attending class so I've worked out the calculations to change their end date based on their attendance. Since I have students on 6 days a week, I have a different worksheet for each day of the week (otherwise, things get super messy).

I have worked out how to calculate the new date by adding weeks according to the attendance code. However, this only affects the one date. Since some students come in multiple times a day or multiple weeks, this creates a problem. I had worked it out so that if the students' name appears on one sheet twice, the second attendance figure was ignored but this leaves my students who come in 2 days a week with problems.

I thought I would create a new table of all names on a helper sheet, combine the attendance from all instances of each name across the workbook, calculate the new date and then feed it back into the right spot on the schedule. But I'm having trouble creating the list of names.

The code I have devised after reading a few posts and tweaking what I saw for my needs (and my Excel03 version) I believe would work but for some reason the calculation just ends midway - no error code, no circular logic problems, just stops calculating (perhaps too many calculations?). Here's the code I have devised:

Code:
=IF(ISERROR(INDEX(Names,MATCH(0,IF(LEN(Names)>0,COUNTIF(Names,"<"&Names),-1)-SUM(COUNTIF(Names,$A$200:A201)),0))), "", (INDEX(Names,MATCH(0,IF(LEN(Names)>0,COUNTIF(Names,"<"&Names),-1)-SUM(COUNTIF(Names,$A$200:A201)),0))))

"Names" is the range I defined to mean column B from worksheets titled Monday - Friday. I think this may be the cause as the code seems to work fine for a range that I input directly and is on the same worksheet.

Any help would be greatly appreciated.

And since I'll be doing this immediately afterward, if anyone cares to help me figure out how to get the corresponding start date from the first instance of each name in the new list, that would be nice too but not really needed at this point. :biggrin:

Cheers!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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