How to return row matching value in filtered data?

freddylem

New Member
Joined
Sep 18, 2017
Messages
1
Hi everyone,

I have a filtered table, and I need to find the first row which matches a value. However "MATCH" formula will return the row of first match in all the data not just the filtered data. I'm a little stumped by this one and can't figure it out.

Any recommendations?

Thanks in advanced.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,

SUBTOTAL and AGGREGATE functions ignore hidden rows, for SUBTOTAL function #3 is COUNTA, you can combine this with a MATCH to find which row has your match, use it to create an indirect range reference and use SUBTOTAL,3 to count how many non-empty cells are visible between the top of your table and the identified match

In an example where what you search is in A1:A13, it would look like this

=SUBTOTAL(3,INDIRECT("A2:A"&MATCH(B18,A1:A13,0)))

If your table doesn't start at row one, you'll need to add the count of extra rows above your table to the result of the MATCH
 
Upvote 0

Forum statistics

Threads
1,224,802
Messages
6,181,054
Members
453,014
Latest member
Chris258

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