I'm writing down my mileage for my Tasks and Calendar appointments and meetings.
Is there a way that Outlook can automatically calculate my mileage for the last month or for a certain client?
It’s not possible to do that in one step, but you can achieve it via a custom view which makes the Mileage column visible and then copy everything to Excel.
As an alternative, you could also use a macro or an add-in record and report on mileage.
Step 1: Recording mileage
Recording mileage for Tasks can be done by opening the task and then selecting the Details tab or clicking the Details button in the Ribbon.
For Calendar items, you can record it via custom view which is also needed for the calculations and explained below.
Step 2: Change your view to a list view
In order to work with the Mileage field, you’d have to change you view to a list view.
View-> Change View-> List
View-> Change View-> Detailed
Note: You can always use the same method to change the view back to for instance the Calendar view.
Step 3: Adding the mileage field
Now that the view has been changed to a list view, you can add the Mileage field in the following way;
- Simplified Ribbon (Microsoft 365)
View-> Current View-> View Settings…-> button Columns…
- Classic Ribbon
View-> View Settings…-> Columns…
In the dialog that pops-up, expand the “Select available columns from” drop down list and select “All Task fields” or “All Appointment fields”. You can now add the the Mileage field by selecting it and pressing the “Add ->” button.
Adding the mileage column in 3 steps.
When you now go back to your folder, you’ll see the Mileage column as well. You can now click on the Mileage cell for any appointment, meeting or task item and fill in the mileage.
Step 4: Copy to Excel
In order to make calculations with your mileage column, you can copy and paste everything from Outlook into an Excel sheet.
To do this, select the first item in the folder and then press CTRL+A to select everything. Press CTRL+C to copy everything into memory. Switch to Excel, select the first cell and press CTRL+V to copy over all the information from Outlook. In Excel, you can use the “SUM” function to easily calculate the combined Mileage.
Note: You can of course customize your view in Outlook further to only show the fields you need. For instance, apply a filter for the timeframe so that only the items of a certain month or client are shown. You can also group by Company or Category to sort your data before copying it over to Excel.
Alternative: VBA Solution
Instead of customizing your View to be able to record mileage for your Appointments, Meetings and Tasks, you could also use a VBA macro. Full code and instructions for this can be found in the guide; Record gas mileage for Appointments, Meetings, Contacts and Tasks.
Similarly, you can use a VBA solution to quickly add up the mileage and time for selected items. For this see; Reporting time spent on Meeting, Task and Journal items.
Get a quick overview of time spent and mileage usage via a VBA macro.
Alternative: Using a reporting add-in for more convenience and flexibility
If you need to do mileage calculations on a regular basis or need a more advanced reporting method, then using the VBOffice Reporter add-in might prove useful to you.
It can report even more than just traveling time and costs from Outlook data, and gives you a lot of flexibility. Reports can be made based on any Task, Calendar or Journal field.