Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding "Last" record in excel

Status
Not open for further replies.

Legends77

Technical User
Jan 18, 2009
57
US
Is there away to find the last record of something in excel? The issue I am having is this... there are multiple rows where data is entered.. I.E. on row 2, color white shows a beginning balance of 300gal and ending balance of 400gal, but then on row 50 white shows a beginning balance of 400gal but an ending balance of 700gal. In between row 2 and 50 multiple other colors are going thru the same process.
What I am trying to do is have a summary sheet that will pull look for "White" and pull the last "Ending Balance" found for the color. This way we would have a sheet that automatically has what "should" be the inventory level.
I know by the people who will be using this file that Access is not an option so it has to stay in excel, therefore my first plan was shot right from the get go.

Any help is greatly appreciated.d
 


What version Excel?

Your BEST approch would be to use data to control the shading, using the Conditional Format feature.

Otherwise, you'll probably need to use VBA to code a solution. Best to post your VBA questions in forum707.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I'm not sure I entirely understand, but it sort of sounds like you want the highest row number that has "white" in one of the columns.

If your color names are in B1:B9 then

=MAX(IF(B1:B9="white",ROW(B1:B9),0))

entered as an array formula will give you the highest row number with "white" in the range.

From there you can build an appropriate INDIRECT or OFFSET.

 


...or INDEX()

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top