Per diem is a daily cash allowance paid to people traveling on business, it varies by location of travel.
There are per diem rates for foreign locations published monthly by the State Department. They adjust for changes in prices and exchange rates. You can download them in an Excel file. Attempting to create a lookup function using the Excel file data however is very difficult because some of the rates begin and end based upon "season" dates (for a higher rate during summer for instance) and those dates are only listed as MM/DD. In cases where the season extends from a month late in the year to one early in the next, it is in two different years. There are also effective dates, for new rates, and expiration dates, for when a rate is no longer in effect. Trying to search the table using SUMIFS for location and date seems to be impossible, mainly due to the season date issue.
The Defense Department maintains the rates for some locations as well, and they compile the GSA rates for continental U.S., the State Department foreign rates, plus their rates. And they have a "relational" file that is in XML format. But even that has the truncated season dates of just the month and day. The relational file does however appear to retain expired rates for a period of time unlike the State Department file which drops them off when a new rate is effective.
The goal would be to create an Excel file with a lookup formula, perhaps with drop-downs to select the location, that looks up the correct per diem rate for any given date. It can't go back forever, but at least a few months would be needed to give people time to return from a trip and then fill out their per diem reimbursement form. The rate would then be filled in from this lookup rather than them search the website on their own.
Then each month the new rate file would be merged into the existing file so that the latest rates would be returned. This would replace the prior download file not add more records to the existing data. (If the only way to get this to work is to combine the monthly downloads somehow into a multi-month download table, that would be less desirable, but if that is required it would be interesting to know that.)
This should be solved for the Foreign XML download file first. The foreign download contains around 3,000 rows in Excel, while the CONUS file for the United States is nearly 80,000 lines in Excel which would make the entire file a bit large to work with. And if a formula is developed on the foreign data it would likely work on the CONUS file as well.
Having worked with this and being unable to come up with a formula I wonder what use the download files are in the Excel format, if other users just manually search the data in Excel rather than use an automated lookup, which sort of defeats the purpose of having the data in Excel.
The most complex location is Sapporo Japan with four different seasons one of which extends from 12/01 - 03/14. That is a good part of the data to work with to try to develop a way to look up the per diem rate for any selected date.
The Defense Department XML files can be found at this link:
Per Diem Rate Files
If you look at this I am sure you will find it to be an interesting challenge.
If you determine that the data they provide is in fact not complete enough to do such a search, that might be helpful in getting them to research this and change the format of their downloadable file.
But it may be that if certain "assumptions" are made, based upon the date of the download file, the year for the season begin and end dates could be backed into, and then along with the effective dates, a search made.
Thank you and good luck,
David
There are per diem rates for foreign locations published monthly by the State Department. They adjust for changes in prices and exchange rates. You can download them in an Excel file. Attempting to create a lookup function using the Excel file data however is very difficult because some of the rates begin and end based upon "season" dates (for a higher rate during summer for instance) and those dates are only listed as MM/DD. In cases where the season extends from a month late in the year to one early in the next, it is in two different years. There are also effective dates, for new rates, and expiration dates, for when a rate is no longer in effect. Trying to search the table using SUMIFS for location and date seems to be impossible, mainly due to the season date issue.
The Defense Department maintains the rates for some locations as well, and they compile the GSA rates for continental U.S., the State Department foreign rates, plus their rates. And they have a "relational" file that is in XML format. But even that has the truncated season dates of just the month and day. The relational file does however appear to retain expired rates for a period of time unlike the State Department file which drops them off when a new rate is effective.
The goal would be to create an Excel file with a lookup formula, perhaps with drop-downs to select the location, that looks up the correct per diem rate for any given date. It can't go back forever, but at least a few months would be needed to give people time to return from a trip and then fill out their per diem reimbursement form. The rate would then be filled in from this lookup rather than them search the website on their own.
Then each month the new rate file would be merged into the existing file so that the latest rates would be returned. This would replace the prior download file not add more records to the existing data. (If the only way to get this to work is to combine the monthly downloads somehow into a multi-month download table, that would be less desirable, but if that is required it would be interesting to know that.)
This should be solved for the Foreign XML download file first. The foreign download contains around 3,000 rows in Excel, while the CONUS file for the United States is nearly 80,000 lines in Excel which would make the entire file a bit large to work with. And if a formula is developed on the foreign data it would likely work on the CONUS file as well.
Having worked with this and being unable to come up with a formula I wonder what use the download files are in the Excel format, if other users just manually search the data in Excel rather than use an automated lookup, which sort of defeats the purpose of having the data in Excel.
The most complex location is Sapporo Japan with four different seasons one of which extends from 12/01 - 03/14. That is a good part of the data to work with to try to develop a way to look up the per diem rate for any selected date.
The Defense Department XML files can be found at this link:
Per Diem Rate Files
If you look at this I am sure you will find it to be an interesting challenge.
If you determine that the data they provide is in fact not complete enough to do such a search, that might be helpful in getting them to research this and change the format of their downloadable file.
But it may be that if certain "assumptions" are made, based upon the date of the download file, the year for the season begin and end dates could be backed into, and then along with the effective dates, a search made.
Thank you and good luck,
David