Reference last entered value in a column

  • Thread starter Thread starter nukechemtech
  • Start date Start date
N

nukechemtech

I set up a vehicle gas/maintenance log with columns of DATE, MILEAGE,
GALLONS to graph & calculate gas mileage, however I also track routine
maintenance like oil changes, tire rotations etc.

I need help with figuring out how to compare the last MILEAGE value
entered with the latest oil change mileage which will turn red when a
oil change is coming up.

The column lenght increases each time I get gas so how do I reference
the last entered mileage with the fixed oil change mileage?
 
This returns the last value in a range B2:B32

=INDEX(B:B,MAX(IF(B2:B32<>"",ROW(2:32))))

just lengthen as required.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Forgot to mention it is an array formula, so enter with Ctrl-Shift-Enter.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bob Phillips said:
This returns the last value in a range B2:B32

=INDEX(B:B,MAX(IF(B2:B32<>"",ROW(2:32))))

just lengthen as required.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
That worked great, now I just set conditional formatting to change the
color of my "oil change due" mileage after comparing with the current
mileage.

Thanks alot!
 
Back
Top