A reader named Mohammed Syed asked if I could put together a script to parse information from messages he receives containing hail reports, and write it to a spreadsheet. Each message body contains one or more reports that look like this
1.00″ reported @ 04/10/2013 15:10 CST IL, BRIGHTON – Zip Code: 62012 Zip Pop: 6261 Zip Homes: 2517 County: MACOUPIN Remarks: DELAYED REPORT. NEAR THE INTERSECTION OF MACCOUPIN… JERSEY… AND MADISON COUNTIES.
For each report, Mohammed wants to extract the date/time of the report, the number of inches, and the zip code the report came from. Next, he needs the solution to create a report ID consisting of the alert date/time, the number of inches, and the zip code. The ID will be a concatenation of the elements with each element separated by an underscore. Mohammed wants the data written to an existing spreadsheet with a new row for each report. Finally, he wants to be able to do this from an Outlook rule he already has.
Here’s my solution. Hopefully this is just what Mohammed is looking for.