Skip to content

Instantly share code, notes, and snippets.

@Omid-M22
Last active February 13, 2022 21:40
Show Gist options
  • Save Omid-M22/2d534789df5e6450c5e274dcd3c3147e to your computer and use it in GitHub Desktop.
Save Omid-M22/2d534789df5e6450c5e274dcd3c3147e to your computer and use it in GitHub Desktop.
Find the location of [r th repeat] of text a ([find text]) in text b ([within-text]) by Excel Lambda function
FindX=LAMBDA([find text], [within-text], [r th repeat],
IF(
[r th repeat] = 1,
FIND([find text], [within-text]),
FIND([find text], [within-text]) + findx([find text], MID([within-text], FIND([find text], [within-text]) + 1, 100), [r th repeat] - 1)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment