LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default MPG Calculations

I have a worksheet used for calculating vehicle fuel economy statistics.
The columns a

A - Date
B - Mileometer reading
C - Amount of fuel added
D - Whether tank full or not ("Y" if full / blank if not)

In column E I want to display the Miles Per Gallon (MPG) based upon the most
recent fill-up. Hence, if the tank was filled, I need to devise a formula
that refers back to when it was last full (ie; when column C last had a "Y"
entered) and then subtracts today's mileage from that in column B when the
tank was last full. If the tank was not full then column E remains blank
until next time it is full.

I can only think of using VLOOKUP for this but not quite sure how as there
will be many instances of "Y" in column C - I just need the most recent.

Any ideas?

Thanks.

Terry Bennett


 
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
Calculations - Max and Min Mark M Excel Worksheet Functions 3 November 19th 07 12:48 AM
Calculations KB-1 Excel Discussion (Misc queries) 2 May 6th 07 02:35 AM
how many calculations? Amie Excel Worksheet Functions 0 April 21st 06 08:04 PM
Help with PV calculations PJF Excel Worksheet Functions 2 October 30th 05 01:04 AM
Between calculations Dan Wilson Excel Worksheet Functions 10 March 15th 05 05:06 PM


All times are GMT +1. The time now is 07:40 AM.

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

About Us

"It's about Microsoft Excel"