How to scan a block of cells for particular text.

Rowlock

New Member
Joined
Feb 18, 2014
Messages
4
Complete Excel newbie here.

I have a workbook consisting of two sheets: a Monthly Class Schedule (Divided into five one-week blocks. Each block's vertical is Mon to Fri, the horizontal is 9 class slots. There are 45 class slots pw). Each class has one student and the cells are filled 'Student Number, First Initial, Surname' eg, '666 J Smith'. Students may be scheduled for several class slots per week and some class slots have no students scheduled. When the student attends a 'P'is added at the beginning of the cell eg,'P 666 J Smith'.

The Student Attendance Report has the students listed vertically on the left, arranged by Student Number, and then a column for each week.
At the moment I have to manually count the classes each student has attended for each week in the Monthly Class Schedule and enter the attendance figures in the appropriate week column in the Student Attendance Report. It's a PitA so I want to automate the process by using the Student Numbers in the Attendance Report Sheet to search the week blocks in the Schedule Sheet for 'P S#' and auto-fill the week columns in the Attendance Sheet. I think I should be using COUNTIF but I haven't been able to get it working. Any ideas will be very gratefully received by myself and the other teachers. I can mail an example workbook if necessary.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try this in cell C4 of the example workbook on Attendance February sheet. Returns 2 on the example for me.

=COUNTIF('Schedule February 2014'!C12:M16,"P "&A4&"*")

You will need to set you absolute references to match your sheet and ranges of course.

Regards,
Howard
 
Upvote 0
Try this in cell C4 of the example workbook on Attendance February sheet. Returns 2 on the example for me.

=COUNTIF('Schedule February 2014'!C12:M16,"P "&A4&"*")

You will need to set you absolute references to match your sheet and ranges of course.

Regards,
Howard


Thank you VERY much, Howard, that is exactly what I was looking for. You've made a group of poorly-paid, over-worked teachers very happy.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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