Home > other >  Excel - Matching if Cell Contains Substring Not Returning Value
Excel - Matching if Cell Contains Substring Not Returning Value

Time:03-18

For some reason this will not return the matched row number for this specific substring. It works just fine with others.

EXAMPLE: Wanting to search/match and return which row contains the text "Tina Marie 5H,6H,7H 1 Initial_Visit"...searching through JR1:JR1000

Formula in JT3: =MATCH("*"&"Tina Marie 5H,6H,7H 1 Initial_Visit"&"*",$JR$1:$JR$1000,0)

If I even just search for "Tina", it returns the row beneath the first actual row...4 rather than 3

enter image description here

enter image description here

CodePudding user response:

The problem is the length of the concatenated values, which would exceed 255 characters. Instead in C2 try:

=LET(X,MIN(IF(ISNUMBER(SEARCH("*"&A2&" "&B2&" initial_visit*",D$2:AB$19)),ROW(D$2:AB$19)-1,"")),IF(X,X,""))
  • Related