Is there a formula that will return positions of matches in an array?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

Is there a formula that will return positions of matches in an array?
E.g. searching for "a" in {"a","b","a","c"} should return {1,0,3,0} or something like that?
I would then need to find the position that is e.g. ">2" and return that position to feed it into INDEX.

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Book1
ABCDEF
1a13
2b0
3a3
4c0
5
Sheet2
Cell Formulas
RangeFormula
C1:C4C1=LET(a,A1:A4,(a="a")*(SEQUENCE(ROWS(a))))
E1E1=LET(a,A1:A4,pos,(a="a")*(SEQUENCE(ROWS(a))), MATCH(TRUE, pos>2,0))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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