Macro For Calculating The Projection Graduation Year Of A Student

ModerCreed

New Member
Joined
May 28, 2012
Messages
20
Morning guys,

I am doing a little bit of Excel work for an independent school's alumni Database, and excel is not my program of choice so I am coming to you guys with a question.

Put simply, each row represents a student, with all the columns carrying various info on that student.

I have a number of past students at the school (in this case, past students are students that didn't graduate from the school, given that they left for some reason) where we have the grade they left the school. We want to use that grade to calculate the theoretical year the student would have graduated high school (Essentially which grad class they would have belonged to if they stayed at the school)

I would like to write some sort of macro or create some formula to do this.

Put into pseudo code, this is what I want it to do:

- Look at the ending grade column (AA on my spreadsheet)

- Look at the ending year column (AB on my spreadsheet)

- Take the ending grade and add a year for every grade they completed after leaving the school before graduating in grade 12

- Put this year in column AD

Here's an example to make things clearer:

A student left the school in grade 9 in 1995. The macro/formula would then correctly calculate that their theoretical grad year is 1998.

Some notes:

- Where I am from, schools go from grade 1 to 12.

- The end year column is the latter part of the school year. So if a student left in the 1998-1999 school year their end year would be 1999.

I hope this isn't super vague! Can anyone help me with this?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You don't need a macro to do this, a formula in the cell you want to populate will do. Something like:

=AB1+(12-AA1)

should do the trick. Hope this helps.
 
Upvote 0
I know this is old but just wanted to say THANKS! I needed to do this today and buxtongt's suggestion worked perfectly! :biggrin:

You don't need a macro to do this, a formula in the cell you want to populate will do. Something like:

=AB1+(12-AA1)

should do the trick. Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,203,327
Messages
6,054,751
Members
444,748
Latest member
knowak87

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