Find last row containing a given value

rez13

New Member
Joined
Dec 8, 2005
Messages
3
Hi Excel world. Help please!

I want to scan a range of rows for any cell which contain a given value. What I need returned is the maximum row number (i.e. last row) which contains the given value.

Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
This should do the trick for you:

=INDEX(A:A,MATCH(9.99999999999999E307,A:A))
=LOOKUP(9.99999999999999E+307,A:A)
=MATCH(9.99999999999999E+307,A:A)
 
Upvote 0
Thanks 98illini. But I'm not sure how to apply what you're saying - where in the formulae do I enter my given value?
Perhaps I should explain my specific problem:


I have 3 projects - let's call them PR1,PR2,PR3. Each project has a row in a Project Summary sheet.

In another sheet of the workbook I have:
In A2:A101. a series of ascending dates (i.e. representing 100 days).
Columns B-I representing the 8 working hours in each day. So each cell in B2-I101 represents a working hour on a certain date.

In B2:I101 the project codes (PR1, PR2) etc. are entered, indicating on which dates and in which hour work on each project is scheduled to be done.
Any cell B2:I101 could contain any of the 3 project codes, and each code could appear in more than one "hour cell".


In my Project Summary sheet, what I need to look up is the latest date in A2:A101 on which work for each particular project is scheduled.
If I move the project codes about to re-schedule work, I want the "latest" date in the summary shet to automatically update.

Hope you can solve this one & Thanx!
 
Upvote 0
Hi rez13:

If the dates in column A are always in ascending order, Barry's formula will give you the correct result, however, if it can not be guaranteed that the dates in column A will always be in ascending order, I suggest you use the following array formula ...

=INDEX(A:A,MAX(IF($B$2:$I$109="PR1",ROW($B$2:$I$109))))
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top