Author Topic: Excel 2007 & Military Pay Chart  (Read 5818 times)

0 Members and 1 Guest are viewing this topic.

Offline SSG Snuggle Bunny

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 23049
  • Reputation: +2233/-269
  • Voted Rookie-of-the-Year, 3 years running
Excel 2007 & Military Pay Chart
« on: December 05, 2012, 06:02:27 PM »
I'm working on a PerStat form using Excel 2007.

I have a drop-down list to select pay grade and a function that will calculate Time In Service by subtracting your PEBD from today's date.

What I need now is a formula that can use PAY GRADE and TIME IN SERVICE to lookup a soldier's BASE PAY from a table on another spreadsheet in the same workbook.


I tried searching "excel 2007 cross-index" but for the life of me I cannot think of any other terms to search. I'm not even search what a good technical term of the function would be.

Any assistance would be appreciated.
According to the Bible, "know" means "yes."

Offline Chris_

  • Little Lebowski Urban Achiever
  • Hero Member
  • *****
  • Posts: 46845
  • Reputation: +2028/-266
Re: Excel 2007 & Military Pay Chart
« Reply #1 on: December 05, 2012, 06:06:09 PM »
Does 2007 support pivot tables?
If you want to worship an orange pile of garbage with a reckless disregard for everything, get on down to Arbys & try our loaded curly fries.

Offline ExGeeEye

  • We don't need another
  • Hero Member
  • *****
  • Posts: 1570
  • Reputation: +235/-103
  • Spread the work ethic; the wealth will follow.
Re: Excel 2007 & Military Pay Chart
« Reply #2 on: December 05, 2012, 06:33:06 PM »
Just out of curiosity, what's the current base pay for an E-5 at 13 years?

That's what I was when HD'd in 1999.  I was making net $2K and change /mo with quarters and rats.
My CCW permit was issued in 1791.

Charter Member: Vast Right-Wing Conspiracy
Associate Member: Basket of Deplorables
Charter Member: Listless Vessels

Offline Thor

  • General Ne'er Do Well, Troublemaker & All Around Meanie!!
  • In Memoriam
  • Hero Member
  • *****
  • Posts: 13103
  • Reputation: +362/-297
  • Native Texan & US Navy (ret)
Re: Excel 2007 & Military Pay Chart
« Reply #3 on: December 05, 2012, 07:38:51 PM »
Wouldn't it be cell1 (paygrade) + cell2 (TIS)= cell3 (pay) Can't you import those cells into the current spreadsheet?  I'm not real sure how those work in a workbook.
« Last Edit: December 05, 2012, 07:41:58 PM by Thor »
"The state must declare the child to be the most precious treasure of the people. As long as the government is perceived as working for the benefit of the children, the people will happily endure almost any curtailment of liberty and almost any deprivation."- IBID

I AM your General Ne'er Do Well, Troublemaker & All Around Meanie!!

"Congress has not unlimited powers to provide for the general welfare, but only those specifically enumerated."-Thomas Jefferson

Offline SSG Snuggle Bunny

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 23049
  • Reputation: +2233/-269
  • Voted Rookie-of-the-Year, 3 years running
Re: Excel 2007 & Military Pay Chart
« Reply #4 on: December 05, 2012, 09:36:24 PM »
Wouldn't it be cell1 (paygrade) + cell2 (TIS)= cell3 (pay) Can't you import those cells into the current spreadsheet?  I'm not real sure how those work in a workbook.

Alas, it isn't an addition operation.

Grade1234
E-11100115012001250
E-21200130014001500
E-31300145016001750
E-41400160018002000

(Not a real pay table.)
According to the Bible, "know" means "yes."

Offline oldcrow

  • Probationary (Probie)
  • Posts: 98
  • Reputation: +16/-0
Re: Excel 2007 & Military Pay Chart
« Reply #5 on: December 14, 2012, 12:40:25 AM »
Try reading up on the LOOKUP Function. That may be what you need if I understand you correctly.
A strong conviction that something must be done is the parent of many bad measures. - Daniel Webster

The Constitution only gives people the right to pursue happiness. You have to catch it yourself.  - Benjamin Franklin

Offline SSG Snuggle Bunny

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 23049
  • Reputation: +2233/-269
  • Voted Rookie-of-the-Year, 3 years running
Re: Excel 2007 & Military Pay Chart
« Reply #6 on: December 19, 2012, 12:25:27 PM »
Try reading up on the LOOKUP Function. That may be what you need if I understand you correctly.

Close.

I ended-up using the INDEX and MATCH functions together.

First, I set-up a Named Range for the pay grade (and other) data. That way I can make a drop-down list to select the Service Member's (SM) pay grade. This enforces data integrity because end-users will get sloppy and use different "formats" for noting pay grade, i.e. e5, e-5, E-5, etc.

Then I set-up a formula to compute Time in Service (TIS).

Code: [Select]
=DATEDIF( IF(YEAR(O2) > 1950,O2,TODAY()), TODAY(), "y")
The referenced cell is the SM's Pay Entry Base Date (PEBD).

What this translates into is: Find the DATEDIF(ference) IF the year in the referenced cell (O2) is greater than 1950 (any date greater than 40 yrs but less than the year 1900 will suffice), and compare that referenced cell to TODAY and express it in the number of years (y).

On a separate worksheet I placed the Base Pay tables for all pay grades. The pay grades run vertically in the A column with the number of years TIS running horizontally on top from 0 to 40. I did each year of TIS as a separate column to facilitate the above PEBD calculation. You can use a MATCH formula to find the nearest value of a given argument but my form hasn't evolved there as of this writing, though it's actually pretty basic.

I have separate worksheets for BAH (housing), BAS (food allowance), FLight Pay and Hazard Pay. I elected to make each one a separate worksheet so they can be easuily edited once the pay rates change. When the workbook is used I'll hide those tabs to keep the random, wandering lieutenant from mucking things up too badly.

So...

...with pay grade and TIS entered on a Personnel Data Sheet the PerStat form pulls this info and then the rest is getting the PerStat form to grab the monthly pay rate.

In my "Base Pay, Monthly" column I entered:

Code: [Select]
=INDEX('Base Pay'!$B$2:$AP$25,MATCH(PerStat!B2,'Base Pay'!$A$2:$A$25,0),MATCH(PerStat!C2,'Base Pay'!$B$1:$AP$1,0))
Broken down, this means:

Using the INDEX function look on the 'Base Pay' table and select the range of cells from B2 thru AP25.

The dollar signs are an absolute reference. Without those dollar signs excel will automatically shift the range of cells it looks at everytime your data moves 1 row/record lower. So, as you move down the PerStat form the referenced cells remain static. To accomplish this click on the worksheet then drag-select the range of cells you need and press F4.

Continuing on:

After looking on the Base Pay worksheet perform a MATCH function. Look on the PerStat sheet to see what data you are looking for; in this case it is cell B2. Then go back to the Base Pay sheet and look at the absolute range of cells from A2 to A25 and find an exact match (the 0 argument).

Then do a second MATCH function. Look at the PerStat form data in cell C2 and then look for that data on the Base Pay worksheet and find that value along absolute range B1 thru AP1 and make sure it is an exact match.

Holy crap! It worked!

Then just rinse and repeat for BAH, BAS, etc. and set-up separate columns to calculate the daily rates as well as keeping running totals for each indiviual SM as well as the task Force as a whole. Throw in columns for when State Active Duty (SAD?!?!?!) began and ended with a calculated total number of days to keep a grand total of our burden to the taxpayers.

The officers in G3 seem happy enough.

As this evolves I'm going to work it into an Access database to make the forms, queries and reports easier on the eyes and then get it mounted onto our SharePoint site.
According to the Bible, "know" means "yes."

Offline EagleKeeper

  • Hero Member
  • *****
  • Posts: 2585
  • Reputation: +133/-100
  • ΜΟΛΩΝ ΛΑΒΕ
Re: Excel 2007 & Military Pay Chart
« Reply #7 on: December 19, 2012, 07:13:23 PM »
Your a dangerous man Sgt. Bunny.

Does your sharepoint site have a SQL backend that might accommodate what you have done so far?
Never interrupt your enemy when he is making a mistake.
- Napoleon Bonaparte

If you wait by the river long enough the bodies of your enemies will float by.
-Sun Tzu

Offline EagleKeeper

  • Hero Member
  • *****
  • Posts: 2585
  • Reputation: +133/-100
  • ΜΟΛΩΝ ΛΑΒΕ
Re: Excel 2007 & Military Pay Chart
« Reply #8 on: December 19, 2012, 07:26:49 PM »
After giving it some more thought, you should be able to move all this functionality over to sharepoint.

The data goes to SQL on the backend and the Excel functions go into sharepoint.

I'm probably overthinking it but its throwaway so what the heck.

You should bounce this off GOPCongress.

Anyway, the point is to push off the backup or disaster recovery duty to the DB and or sharepoint admin.
Never interrupt your enemy when he is making a mistake.
- Napoleon Bonaparte

If you wait by the river long enough the bodies of your enemies will float by.
-Sun Tzu

Offline SSG Snuggle Bunny

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 23049
  • Reputation: +2233/-269
  • Voted Rookie-of-the-Year, 3 years running
Re: Excel 2007 & Military Pay Chart
« Reply #9 on: December 19, 2012, 08:03:06 PM »
After giving it some more thought, you should be able to move all this functionality over to sharepoint.

The data goes to SQL on the backend and the Excel functions go into sharepoint.

I'm probably overthinking it but its throwaway so what the heck.

You should bounce this off GOPCongress.

Anyway, the point is to push off the backup or disaster recovery duty to the DB and or sharepoint admin.

We have SQL Server 2008 R2 with Excel and Access services enabled but as the form is meant for field use (paying people on Defense Support of Civil Authority missions) it has to be assumed the OIC won't have anything more than a laptop. Then, since it goes to the state civil government they don't have access to our intranet (and their director insists they use Open Office).

*sighs*

However, since we want dashboard data the Joint Ops Center will probably want to publish the data. I intend to publish this as an Excel webpart in a site that is then set as a template. Then, whenever we get a new DSCA mission they just stand-up a new site named after the mission and start plugging in the people, assets and other info. It becomes both an operational asset and ultimately a historical record.

And yes, I just build 'em. If the damn thing breaks later or there's a crash I leave it to the poor admin sap sitting next to me.   :-)
According to the Bible, "know" means "yes."

Offline EagleKeeper

  • Hero Member
  • *****
  • Posts: 2585
  • Reputation: +133/-100
  • ΜΟΛΩΝ ΛΑΒΕ
Re: Excel 2007 & Military Pay Chart
« Reply #10 on: December 19, 2012, 08:21:59 PM »
I used to work tech support for a company called Doubletake software and have had experience interacting with DOD networks so I understand how prickly it can be to get to the central site.

You know what it is you are dealing with, if there is anything I can help with please feel free to let me know.

Edit:I am not kidding, I don't have a lot on my dance card. If any of you goons want some help with something computer related, let me help, if I don't know the answer I can find it.
« Last Edit: December 19, 2012, 08:34:04 PM by EagleKeeper »
Never interrupt your enemy when he is making a mistake.
- Napoleon Bonaparte

If you wait by the river long enough the bodies of your enemies will float by.
-Sun Tzu