Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Looking for Mileage / MPG Tracking formula

I'm trying to build a daily mileage spreadsheet that will allow me to enter
my daily mileage, and will use these numbers to calculate Miles Per Gallon on
the days when I fill up the tank (1-2 days per week).

So, column headings are as such:

A-----B---------C--------------D---------------E-----F
Date, Odometer, Miles Driven, Gallons Used, MPG, Average MPG
1/22, 0000
1/23, 0365
1/24, 0724
1/25, 0912, 912, 74, 12.32
1/28, 1215
1/29, 1526
1/30, 1797, 885, 76, 11.64
..
..
..

How could I put together a formula that will subtract the odometer reading
on 1/30 from the last fillup, whenever that was, to calculate the mpg?

Any information would be helpful.
Thanks!

--
Wayne B - MN
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Looking for Mileage / MPG Tracking formula

Try this:

I would move your columns around slightly:

Column C = Gallons Used
Column D = Miles Driven

Place a 0 in cell C2 as your initial entry for Gallons Used

Then, enter this formula in cell D2 under Miles Driven: This is an array
formula and needs to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=IF(C2=0,"",B2-LARGE(IF(C$2:C2<"",B$2:B2),2))

Enter this formula in E2 under MPG:

=IF(COUNT(C2:D2)<2,"",D2/C2)

Format as NUMBER 2 decimal places

Select both D2 and E2 and copy down as needed.

Biff

"WayneB" wrote in message
...
I'm trying to build a daily mileage spreadsheet that will allow me to
enter
my daily mileage, and will use these numbers to calculate Miles Per Gallon
on
the days when I fill up the tank (1-2 days per week).

So, column headings are as such:

A-----B---------C--------------D---------------E-----F
Date, Odometer, Miles Driven, Gallons Used, MPG, Average MPG
1/22, 0000
1/23, 0365
1/24, 0724
1/25, 0912, 912, 74, 12.32
1/28, 1215
1/29, 1526
1/30, 1797, 885, 76, 11.64
.
.
.

How could I put together a formula that will subtract the odometer reading
on 1/30 from the last fillup, whenever that was, to calculate the mpg?

Any information would be helpful.
Thanks!

--
Wayne B - MN



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Looking for Mileage / MPG Tracking formula

That seems to be doing the trick,

Thanks for your help!

--
Wayne B - MN


"T. Valko" wrote:

Try this:

I would move your columns around slightly:

Column C = Gallons Used
Column D = Miles Driven

Place a 0 in cell C2 as your initial entry for Gallons Used

Then, enter this formula in cell D2 under Miles Driven: This is an array
formula and needs to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=IF(C2=0,"",B2-LARGE(IF(C$2:C2<"",B$2:B2),2))

Enter this formula in E2 under MPG:

=IF(COUNT(C2:D2)<2,"",D2/C2)

Format as NUMBER 2 decimal places

Select both D2 and E2 and copy down as needed.

Biff

"WayneB" wrote in message
...
I'm trying to build a daily mileage spreadsheet that will allow me to
enter
my daily mileage, and will use these numbers to calculate Miles Per Gallon
on
the days when I fill up the tank (1-2 days per week).

So, column headings are as such:

A-----B---------C--------------D---------------E-----F
Date, Odometer, Miles Driven, Gallons Used, MPG, Average MPG
1/22, 0000
1/23, 0365
1/24, 0724
1/25, 0912, 912, 74, 12.32
1/28, 1215
1/29, 1526
1/30, 1797, 885, 76, 11.64
.
.
.

How could I put together a formula that will subtract the odometer reading
on 1/30 from the last fillup, whenever that was, to calculate the mpg?

Any information would be helpful.
Thanks!

--
Wayne B - MN




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Looking for Mileage / MPG Tracking formula

You're welcome. Thanks for the feedback!

Biff

"WayneB" wrote in message
...
That seems to be doing the trick,

Thanks for your help!

--
Wayne B - MN


"T. Valko" wrote:

Try this:

I would move your columns around slightly:

Column C = Gallons Used
Column D = Miles Driven

Place a 0 in cell C2 as your initial entry for Gallons Used

Then, enter this formula in cell D2 under Miles Driven: This is an array
formula and needs to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=IF(C2=0,"",B2-LARGE(IF(C$2:C2<"",B$2:B2),2))

Enter this formula in E2 under MPG:

=IF(COUNT(C2:D2)<2,"",D2/C2)

Format as NUMBER 2 decimal places

Select both D2 and E2 and copy down as needed.

Biff

"WayneB" wrote in message
...
I'm trying to build a daily mileage spreadsheet that will allow me to
enter
my daily mileage, and will use these numbers to calculate Miles Per
Gallon
on
the days when I fill up the tank (1-2 days per week).

So, column headings are as such:

A-----B---------C--------------D---------------E-----F
Date, Odometer, Miles Driven, Gallons Used, MPG, Average MPG
1/22, 0000
1/23, 0365
1/24, 0724
1/25, 0912, 912, 74, 12.32
1/28, 1215
1/29, 1526
1/30, 1797, 885, 76, 11.64
.
.
.

How could I put together a formula that will subtract the odometer
reading
on 1/30 from the last fillup, whenever that was, to calculate the mpg?

Any information would be helpful.
Thanks!

--
Wayne B - MN






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for Mileage from Latitude and Longitude Adams135 Excel Discussion (Misc queries) 3 September 11th 07 04:00 PM
Is there a Mileage Tracking function? noah Excel Worksheet Functions 1 March 23rd 07 11:56 AM
Mod Formula for Mileage? Debbie D. Excel Worksheet Functions 3 March 19th 07 06:38 PM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
mileage reimbursement formula Cinder Excel Discussion (Misc queries) 2 June 23rd 05 10:33 PM


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"