Reference last entered value in a column
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? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reference last entered value in a column
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) "nukechemtech" wrote in message ... 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? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reference last entered value in a column
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" wrote in message ... 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) "nukechemtech" wrote in message ... 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? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reference last entered value in a column
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! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 04:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com