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.

Name
Gate Pass Required
Person Collecting
Tinashe Matambo
Yes
Mr. Matambo
Verain Mungate
Prince Mbazvo
Yes
Mrs. Maraidza

<tbody>
</tbody>
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:

Tinokura Gate Pass
Tinokura Gate Pass
This serves to confirm that:
This serves to confirm that:
"Name of Child to be picked"
"name of child to be picked"
Has been given permission
Has been given permission
to leave after his sporting
to leave after his sporting
on 2 November 2019
on 2 November 2019
Signed:________________
Signed:________________
Tinokura Housemaster
Tinokura Housemaster
Tinokura Gate Pass
Tinokura Gate Pass
This serves to confirm that:
This serves to confirm that:
"Name of Child to be picked"
"Name of Child to be picked"
Has been given permission
Has been given permission
to leave after his sporting
to leave after his sporting
on 2 November 2019
on 2 November 2019
Signed:________________
Signed:________________
Tinokura Housemaster
Tinokura Housemaster

<tbody>
</tbody>

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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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