#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Formula problem

I have created a drivers system in excel, I require this system to
include mileages of the cars. I currently put the mileage reading into
a column and compare it to the last reading. I want the spreadsheet to
this automatically, which would save a great deal of time. So using
the example below the reading would get the new value for C which is
5890 and the of 5888 and deduce a figure of 2.

Hear is an example with the first four values being the start up
Mileages of the drivers.

Car Mileage Days Mileage
A 10145 -
B 8999 -
C 5888 -
D 7885 -
B 9019 20
D 7906 21
A 10190 45
D 7935 29
C 5890 2

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Formula problem

Hi,

Try this:

=MAX(IF($A$2:A6=A6,$B$2:B6))-MAX(IF(($A$2:A6=A6)*($B$2:B6<MAX(IF($A$2:A6=A6,$B$ 2:B6))),$B$2:B6))

enter using Ctrl+Shift+Enter

put this formula in the cell with the first daily reading (not the starting
reading), in your example it would be C6 don't forget to adjust the ranges to
suit your setup then copy down.

HTH
Jean-Guy

"Dave" wrote:

I have created a drivers system in excel, I require this system to
include mileages of the cars. I currently put the mileage reading into
a column and compare it to the last reading. I want the spreadsheet to
this automatically, which would save a great deal of time. So using
the example below the reading would get the new value for C which is
5890 and the of 5888 and deduce a figure of 2.

Hear is an example with the first four values being the start up
Mileages of the drivers.

Car Mileage Days Mileage
A 10145 -
B 8999 -
C 5888 -
D 7885 -
B 9019 20
D 7906 21
A 10190 45
D 7935 29
C 5890 2


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Formula problem

Maybe something like this:

With
A1:B10 containing your posted sample data

This formula returns the latest mileage increment
C6: =B6-LARGE(INDEX(($A$2:A6=A6)*$B$2:B6,0),2)
Copy that formula down

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Dave" wrote:

I have created a drivers system in excel, I require this system to
include mileages of the cars. I currently put the mileage reading into
a column and compare it to the last reading. I want the spreadsheet to
this automatically, which would save a great deal of time. So using
the example below the reading would get the new value for C which is
5890 and the of 5888 and deduce a figure of 2.

Hear is an example with the first four values being the start up
Mileages of the drivers.

Car Mileage Days Mileage
A 10145 -
B 8999 -
C 5888 -
D 7885 -
B 9019 20
D 7906 21
A 10190 45
D 7935 29
C 5890 2


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Formula problem

On 30 Jan, 18:40, pinmaster
wrote:
Hi,

Try this:

=MAX(IF($A$2:A6=A6,$B$2:B6))-MAX(IF(($A$2:A6=A6)*($B$2:B6<MAX(IF($A$2:A6=A6,$B$ 2:B6))),$B$2:B6))

enter using Ctrl+Shift+Enter

put this formula in the cell with the first daily reading (not the starting
reading), in your example it would be C6 don't forget to adjust the ranges to
suit your setup then copy down.

HTH
Jean-Guy

"Dave" wrote:
I have created a drivers system in excel, I require this system to
include mileages of the cars. I currently put the mileage reading into
a column and compare it to the last reading. I want the spreadsheet to
this automatically, which would save a great deal of time. So using
the example below the reading would get the new value for C which is
5890 and the of 5888 and deduce a figure of 2.


Hear is an example with the first four values being the start up
Mileages of the drivers.


Car Mileage Days Mileage
A 10145 -
B 8999 -
C 5888 -
D 7885 -
B 9019 20
D 7906 21
A 10190 45
D 7935 29
C 5890 2



Thanks guys for your time they both work a treat. Definetly something
I can use in the spreadsheet.

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
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
formula percentage problem thinkpic New Users to Excel 4 November 2nd 05 08:04 PM
problem with Array Formula OrdOff Excel Worksheet Functions 2 June 30th 05 04:57 PM


All times are GMT +1. The time now is 10:13 PM.

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"