Find last exact match in column

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
Can someone show me how to find the row number last exact match in column C?

The values are all numeric, so it needs to be a precise match and must be the last value found as there will be duplicates.

Sheet1

C
11234
212345
31234
41234456
5XXX
61234
7XXX
8XXX
91234
10XXX
113447589
123816444.5

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


In the example above, if I searched for '1234' I'd expect the result to be row 9.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I think this array formula (CTRL+Shift+Enter) should do it (adjust the 12 rows accordingly):

Code:
=MAX((1234=C1:C12)*ROW(1:12))
 
Upvote 0
This non-array formula will also work:

=LOOKUP(2,1/(C1:C12=1234),ROW(C1:C12))
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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