T_SF

=T_SF(a,as,sf,pa)

a
array
as
array search, search/find array
sf
search/find argument, 0 or ignored for SEARCH, 1 for FIND
pa
pattern array, always ignored, builds final pattern array

tool search/find lambda, shows occurrence pattern of searching/finding an array within another array

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
860
Office Version
  1. 365
Platform
  1. Windows
T_SF !! recursive !! tool search/find lambda, shows occurrence pattern of searching/finding an array within another array. calls AFLATTEN
Excel Formula:
=LAMBDA(a,as,sf,pa,
    LET(d,"|",sa,AFLATTEN(as),s,FILTER(sa,sa<>""),
       n,ROWS(s),x,INDEX(s,n),
       IF(n=1,ATRIM(IF(ISNUMBER(IF(sf,FIND(x,a),SEARCH(x,a))),1&d,"")&pa,d,),T_SF(a,INDEX(s,SEQUENCE(n-1)),sf,IF(ISERROR(IF(sf,FIND(x,a),SEARCH(x,a))),"",n)&d&pa))
    )
)
LAMBDA 7.0.xlsx
ABCDEFGHIJKLM
1T_SF Lambda recursive Tool SEARCH/FIND, shows occurrence pattern of searching/finding an array within other array
2samplesearch/find array
3axbcwdezfyxyzw
4abzwcdzxefxwindex1234
5azwxbcywdeXWfZY
6abYxWzcdZWxefYx
7azwyxbcdeYXWZf
8
9=T_SF(A3:F7,I10:J11,,)
101432sf=0xy
113|41|31|4(search)zw
121|3|42|41|42|3
131|2|3|41|3|41|2
141|2|3|41|2|3|4
15
16=T_SF(A3:F7,I17:I20,1,)
171432sf=1x
183|41|31|4(find)y
191|3|42|4z
201|311w
211|2|3|4
22
23=T_SF(A3:F7,I24:L24,0,)
241432sf=0XYZW
253|41|31|4(search)
261|3|42|41|42|3
271|2|3|41|3|41|2
281|2|3|41|2|3|4
29
30=T_SF(A3:F7,I31:K32,1,)
31 sf=1XYZ
32(find)W
331|42|3
342|43|42
351|2|3|4
36
T_SF post
Cell Formulas
RangeFormula
A9,A30,A23,A16A9=FORMULATEXT(A10)
A10:F14A10=T_SF(A3:F7,I10:J11,,)
A17:F21A17=T_SF(A3:F7,I17:I20,1,)
A24:F28A24=T_SF(A3:F7,I24:L24,0,)
A31:F35A31=T_SF(A3:F7,I31:K32,1,)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,575
Messages
6,173,148
Members
452,502
Latest member
PQCurious

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