Gate pass slips for a school

ShiftyThor

New Member
Joined
Mar 4, 2013
Messages
14
Good day all, I am working on a sheet for a school, and would like to create an automatic selection from one sheet to another. The idea is to have one sheet with various details, and then another with a form for a gate pass. What I am aiming for is the name to appear on the gate pass, if the child has a "Yes" in a certain column.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Gate Pass Required
[/TD]
[TD]Person Collecting
[/TD]
[/TR]
[TR]
[TD]Tinashe Matambo
[/TD]
[TD]Yes
[/TD]
[TD]Mr. Matambo
[/TD]
[/TR]
[TR]
[TD]Verain Mungate
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Prince Mbazvo
[/TD]
[TD]Yes
[/TD]
[TD]Mrs. Maraidza
[/TD]
[/TR]
</tbody>[/TABLE]
This is the master file which would hold various other information, date in date out etc. However I would require the above to then select "Yes" from the gate pass column to then extract the name and place it in the forms below to be printed:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Tinokura Gate Pass
[/TD]
[TD]Tinokura Gate Pass
[/TD]
[/TR]
[TR]
[TD]This serves to confirm that:
[/TD]
[TD]This serves to confirm that:
[/TD]
[/TR]
[TR]
[TD]"Name of Child to be picked"
[/TD]
[TD]"name of child to be picked"
[/TD]
[/TR]
[TR]
[TD]Has been given permission
[/TD]
[TD]Has been given permission
[/TD]
[/TR]
[TR]
[TD]to leave after his sporting
[/TD]
[TD]to leave after his sporting
[/TD]
[/TR]
[TR]
[TD]on 2 November 2019
[/TD]
[TD]on 2 November 2019
[/TD]
[/TR]
[TR]
[TD]Signed:________________
[/TD]
[TD]Signed:________________
[/TD]
[/TR]
[TR]
[TD]Tinokura Housemaster
[/TD]
[TD]Tinokura Housemaster
[/TD]
[/TR]
[TR]
[TD]Tinokura Gate Pass
[/TD]
[TD]Tinokura Gate Pass
[/TD]
[/TR]
[TR]
[TD]This serves to confirm that:
[/TD]
[TD]This serves to confirm that:
[/TD]
[/TR]
[TR]
[TD]"Name of Child to be picked"
[/TD]
[TD]"Name of Child to be picked"
[/TD]
[/TR]
[TR]
[TD]Has been given permission
[/TD]
[TD]Has been given permission
[/TD]
[/TR]
[TR]
[TD]to leave after his sporting
[/TD]
[TD]to leave after his sporting
[/TD]
[/TR]
[TR]
[TD]on 2 November 2019
[/TD]
[TD]on 2 November 2019
[/TD]
[/TR]
[TR]
[TD]Signed:________________
[/TD]
[TD]Signed:________________
[/TD]
[/TR]
[TR]
[TD]Tinokura Housemaster
[/TD]
[TD]Tinokura Housemaster
[/TD]
[/TR]
</tbody>[/TABLE]

There will be about 4 or 6 slips printed on one paper. The problem is when using the "if" command, it will not align the rows, other than doing a serious of if commands incorporating the previous slip. There are around 300 students. The idea is to save paper, and if a column is blank in the master file, it will not be selected in the gate pass sheet, but rather select the next available "Yes"

Many thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi, you could try something like this:


Excel 2013/2016
ABC
1NameGate Pass RequiredPerson Collecting
2Tinashe MatamboYesMr. Matambo
3Verain Mungate
4Prince MbazvoYesMrs. Maraidza
5student 1
6student 2YesMrs. Maraidza
7student 3
8student 4
9student 5
10student 6YesMrs. Maraidza
Sheet1



Excel 2013/2016
AB
1Tinokura Gate PassTinokura Gate Pass
2This serves to confirm that:This serves to confirm that:
3Tinashe MatamboPrince Mbazvo
4Has been given permissionHas been given permission
5to leave after his sportingto leave after his sporting
6on 2 November 2019on 2 November 2019
7Signed:________________Signed:________________
8Tinokura HousemasterTinokura Housemaster
9Tinokura Gate PassTinokura Gate Pass
10This serves to confirm that:This serves to confirm that:
11student 2student 6
12Has been given permissionHas been given permission
13to leave after his sportingto leave after his sporting
14on 2 November 2019on 2 November 2019
15Signed:________________Signed:________________
16Tinokura HousemasterTinokura Housemaster
Sheet2
Cell Formulas
RangeFormula
A3=INDEX(Sheet1!$A$2:$A$10,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$10)-MIN(ROW(Sheet1!$A$2:$A$10))+1)/(Sheet1!$B$2:$B$10="Yes"),1))
A11=INDEX(Sheet1!$A$2:$A$10,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$10)-MIN(ROW(Sheet1!$A$2:$A$10))+1)/(Sheet1!$B$2:$B$10="Yes"),3))
B3=INDEX(Sheet1!$A$2:$A$10,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$10)-MIN(ROW(Sheet1!$A$2:$A$10))+1)/(Sheet1!$B$2:$B$10="Yes"),2))
B11=INDEX(Sheet1!$A$2:$A$10,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$10)-MIN(ROW(Sheet1!$A$2:$A$10))+1)/(Sheet1!$B$2:$B$10="Yes"),4))


The number highlighted red below is the xth row with a "Yes" in column B

=INDEX(Sheet1!$A$2:$A$10,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$10)-MIN(ROW(Sheet1!$A$2:$A$10))+1)/(Sheet1!$B$2:$B$10="Yes"),1))
 
Upvote 0
Great thank you very much. You are a legend. It seems to be working from the first few I have done.

Thank you again, truly appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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