Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

excel - Find and match only first 5 character in 2 columns

Maybe u can help me with the formula.

Column 1 (named A) containt 2590 rows with 5 numbers like

12345
41266
71263
12653
71263

Column2 (named H) contains only 300 rows with numbers like:

71637126371623
67126317236173
61616161162542
71621762165265

I need to match column1 and column2 and find rows in column2 which contains 5 digits numbers from column1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Assuming you only want to look whether the cells next to each other 1 is a substring of the other, you can get the result with if,isnumber,search, all in one:

=IF(ISNUMBER(SEARCH(A2,B2)),1,0)

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...