Forum Discussion
Sintra950
Apr 28, 2023Copper Contributor
Search a value in a table partially matching
Hi forum, I need help because I am out of ideas. I need to get current emails for my users based on previous emails they could have. I tried combining functions search, vlookup, match, index, etc. ...
- Apr 29, 2023
Yes, we search in a column value by value. SEARCH itself returns the spill, we take from it first matched position. Since you are on 365 it could be modified a bit
=XLOOKUP( TRUE, ISNUMBER(SEARCH(E4, previous)), current, XLOOKUP(E4, current, current, "no such") )Or you may generate the spill with all results at once
=SCAN( "", value, LAMBDA(_,v, XLOOKUP( TRUE, ISNUMBER(SEARCH(v, previous)), current, XLOOKUP(v, current, current, "no such") ) ) )Please check in attached file
Sintra950
Apr 29, 2023Copper Contributor
The problem I think the Search function, as I know is searching in a string (cell). I need to search in a column. Here is when I tried use it
SergeiBaklan
Apr 29, 2023Diamond Contributor
Yes, we search in a column value by value. SEARCH itself returns the spill, we take from it first matched position. Since you are on 365 it could be modified a bit
=XLOOKUP(
TRUE,
ISNUMBER(SEARCH(E4, previous)),
current,
XLOOKUP(E4, current, current, "no such")
)
Or you may generate the spill with all results at once
=SCAN(
"",
value,
LAMBDA(_,v,
XLOOKUP(
TRUE,
ISNUMBER(SEARCH(v, previous)),
current,
XLOOKUP(v, current, current, "no such")
)
)
)
Please check in attached file
- Sintra950Jun 25, 2023Copper ContributorThanks so much, it worked. It helped me a lot.
- SergeiBaklanJun 25, 2023Diamond Contributor
Sintra950 , glad to help