简体   繁体   中英

How to search a column value in another column in excel

I want search cell A value in cell B and arrange accordingly in cell C.

How to achieve this?

For exmaple A1= abcd xyz and B10 = abcd so B10 is exist in A1 so I want to arrange this B10 value in C1

Try below formula.

 =IF(ISNUMBER(SEARCH(B1,A1)),B1,"")

在此处输入图片说明

You can type below formula in Cell C1 . If B10 is found in A1, it will put B10 value in C1. Otherwise, it will put "".

=IF(SEARCH(B10,A1) > 0,B10,"")

UPDATE : If value is not present, it will lead to #VALUE error. You can try below solution

=IFERROR(IF(SEARCH(B1,A1),B1,""),"")

@Harun24HR, has provided more cleaner solution to the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM