Hey,

I want to create a car mileage tracker spreadsheet, and I had a crack at creating my own, but I'm awful with formulae and things like that.

I found this on the Office Templates site (http://office.microsoft.com/en-us/te...lates/mileage-log-TC006088458.aspx) and was wondering - could I add an extra time column so it could be entered as start and end time, then output that to a separate column to give a total driving time (this I can do, just), but take the data from that cell and work out an average speed from the distance driven cell (which is derived from the start/end cells for the odometer)?

I tried this but I think it failed to work because it was trying to take data from a cell that had a formula in it and was a destination cell for a sum. I'd quite like to work out a system to show average MPG (UK Gallons) and cost per mile but I can't find anything online telling me how to do it, nor can I work out how to do it myself.

[Edited 2012-11-11 12:26:52]

I want to create a car mileage tracker spreadsheet, and I had a crack at creating my own, but I'm awful with formulae and things like that.

I found this on the Office Templates site (http://office.microsoft.com/en-us/te...lates/mileage-log-TC006088458.aspx) and was wondering - could I add an extra time column so it could be entered as start and end time, then output that to a separate column to give a total driving time (this I can do, just), but take the data from that cell and work out an average speed from the distance driven cell (which is derived from the start/end cells for the odometer)?

I tried this but I think it failed to work because it was trying to take data from a cell that had a formula in it and was a destination cell for a sum. I'd quite like to work out a system to show average MPG (UK Gallons) and cost per mile but I can't find anything online telling me how to do it, nor can I work out how to do it myself.

[Edited 2012-11-11 12:26:52]

- petertenthije
**Posts:**3331**Joined:**

= (mileage) / (traveltime) / 24

In the cell properties format your cell as standard text instead of hour text.

In the cell properties format your cell as standard text instead of hour text.

Attamottamotta!

Sure, no problem.

In your template, I take column K and label it Start Time, column L ist End Time, column M is Duration and column N ist Avg Speed. I define the data cells in column K and L as "time", and column M and N as regular numbers.

In K and L you just put in the times in a regular hour format, like 12:15.

Column M is "=24*(L7-K7)" - that gives you the time in hours.

Column N is "=J7/M7", giving you the average speed in mph or kph, whatever you use.

Average MPG and cost is more difficult, but there should be templates for that available online.

In your template, I take column K and label it Start Time, column L ist End Time, column M is Duration and column N ist Avg Speed. I define the data cells in column K and L as "time", and column M and N as regular numbers.

In K and L you just put in the times in a regular hour format, like 12:15.

Column M is "=24*(L7-K7)" - that gives you the time in hours.

Column N is "=J7/M7", giving you the average speed in mph or kph, whatever you use.

Average MPG and cost is more difficult, but there should be templates for that available online.

Samson was a biblical tough guy, but his dad Samsonite was even more of a hard case.

I tried that and all it did was take my time (3h) and my distance (25 miles) and tell me I did an average of 4800mph. I'm guessing that isn't correct https://docs.google.com/spreadsheet/...DMy1jUmZnTDhGTTJrQi16Tmd2dUE#gid=0

I created my own instead but this is what it did.

Edit:

Rara, I tried that and it gave me my time with a minus sign in front of it, I gather I've done something wrong?

[Edited 2012-11-11 13:13:30]

Edit: I put the cells the wrong way around in the formula. Ooops!

[Edited 2012-11-11 13:21:41]

I created my own instead but this is what it did.

Edit:

Rara, I tried that and it gave me my time with a minus sign in front of it, I gather I've done something wrong?

[Edited 2012-11-11 13:13:30]

Edit: I put the cells the wrong way around in the formula. Ooops!

[Edited 2012-11-11 13:21:41]

- petertenthije
**Posts:**3331**Joined:**

You'll need to include the date in columns B and C. Then put the function I included in reply 1 in column J.

Attamottamotta!

What about this now?

https://docs.google.com/spreadsheet/...N-UdFE0MHNYeG44LUdjT0toeEZXT29FdVE

Guessing the average speed is wrong but I've followed Rara's instructions but it doesn't seem to display correctly.

https://docs.google.com/spreadsheet/...N-UdFE0MHNYeG44LUdjT0toeEZXT29FdVE

Guessing the average speed is wrong but I've followed Rara's instructions but it doesn't seem to display correctly.

- petertenthije
**Posts:**3331**Joined:**

You've divided *miles end* with travel time instead of *miles completed* with travel time.

[Edited 2012-11-11 13:29:52]

[Edited 2012-11-11 13:29:52]

Attamottamotta!

Yap... getting there though.

This one works:

https://docs.google.com/spreadsheet/ccc?key=0Anb3gXagqiSodFVRNldCUGc3N09sNmFmVmZtQzU2cXc

This one works:

https://docs.google.com/spreadsheet/ccc?key=0Anb3gXagqiSodFVRNldCUGc3N09sNmFmVmZtQzU2cXc

Samson was a biblical tough guy, but his dad Samsonite was even more of a hard case.

Seems to be correct now, though 25 miles over the course of 3 hours is *very* slow. You might want to try driving a bit faster.

Ah, so you're right. Brain fart!

I think it's working now - I just need to rearrange the columns to look a bit better and make it look a tad less boring.

I think it's working now - I just need to rearrange the columns to look a bit better and make it look a tad less boring.

Also, I would consider adding if(C2<B2, C2+1, C2) in place of the C2 in the formula in D2 as you had before.

[Edited 2012-11-11 13:35:53]

[Edited 2012-11-11 13:35:53]

I know you shouldn't double post but I got it to work, MPG calculations and all!

https://docs.google.com/spreadsheet/...N-UdDM0WEZ6d1JCbzBqY0sxdkcwb2FwR1E

Now for cost per mile....

https://docs.google.com/spreadsheet/...N-UdDM0WEZ6d1JCbzBqY0sxdkcwb2FwR1E

Now for cost per mile....

- petertenthije
**Posts:**3331**Joined:**

Quoting ajd1992 (Reply 13):I know you shouldn't double post but I got it to work, |

This will only work when you arrive on the same day you depart. To counter that problem either add the dates in the cells with the times, or include the function jamincan mentioned in reply 11.

For cost per mile include a column with the price per liter (or gallon). Multiply the costs per liter by the amount of liter used, and divide by the distance travelled.

Assume price per liter is listed in column Q and the costs per mile in column R. The formula in column R becomes =Q3*N3/J3.

Attamottamotta!

Here's a link to a copy of the spreadsheet with my correction added:

https://docs.google.com/spreadsheet/ccc?key=0AgkqDK_yJGQAdE16My1QOFktUkFodnA1MXJ2dU1OU1E

https://docs.google.com/spreadsheet/ccc?key=0AgkqDK_yJGQAdE16My1QOFktUkFodnA1MXJ2dU1OU1E

Users browsing this forum: TheF15Ace and 2 guests