Find the last entry in a list

HappsLucks

Board Regular
Joined
May 6, 2016
Messages
72
Hi, hope somebody can offer a simple solution, I have gone blank today.

Columns A and B are populated be a series of intricate formula.
I need a formula to return a value from Column B.

From the example below, the formula should return the value for the last "y" in Column A from B - in this case, "Pink".

<title>Excel Jeanie HTML</title>******>Sheet1

*AB
1ywhite
2yblue
3ygreen
4*orange
5yyellow
6yred
7yblack
8*violet
9ymagenta
10*purple
11ypink

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Here's one way:


Excel 2010
ABCD
1ywhite
2yblue
3ygreen
4*orange
5yyellow
6yred
7yblack
8*violet
9ymagenta
10*purple
11ypinkpink
Sheet1
Cell Formulas
RangeFormula
D11{=INDEX(B1:B11,SMALL(IF(A1:A11="y",ROW(A1:A11)-ROW(INDEX(A1:A11,1,1))+1),COUNTIF(A1:A11,"y")))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Try

=INDEX(B1:B11,MATCH(2,1/(A1:A11="y")),0)

Enter as an array - Ctrl, Shift & Enter
 
Last edited:
Upvote 0
Here's one way:

Excel 2010
ABCD
1ywhite
2yblue
3ygreen
4*orange
5yyellow
6yred
7yblack
8*violet
9ymagenta
10*purple
11ypinkpink

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
D11{=INDEX(B1:B11,SMALL(IF(A1:A11="y",ROW(A1:A11)-ROW(INDEX(A1:A11,1,1))+1),COUNTIF(A1:A11,"y")))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Thank you, works a charm.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

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