Reference last entered value in a column

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?
 
B

Bob Phillips

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)
 
B

Bob Phillips

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)
 
N

nukechemtech

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top