I have a huge data in excel sheet in which i have to see if a word (part 1) or (part 2) comes in any cell in Column A it should copy this specific word (Part 1) (part 2) in Column b, otherwise it returns with (blank) or (-)
I am able to search and copy if there is a word (Part 1) in cell by using the formula =if(isnumber(search("Part 1",A1)),"Part 1","-") but i am not able to look two criteria.
please see e.g. in screenshot.
Is there any solution or if anyone can guide.
CodePudding user response:
You can use this formula:
=IFERROR(MID(A1,FIND("Part ",A1), 6),"-")
It looks for "Part " - and returns the substring if found - by that you avoid having an extra condition for Part 1 and Part 2
CodePudding user response:
Try this formula, it will check for both conditions and return answer accordingly. =IF(ISNUMBER(SEARCH("Part 1",A1)),"Part 1",IF(ISNUMBER(SEARCH("Part 2",A2)),"Part 2","_"))
Hope you'll find this helpful..