1.

Solve : EXCEL String Search?

Answer»

I am not sure if MS EXCEL cell can handle such a request. I have a SPREADSHEET where cell F9 through Fnnn can start with the character string ny, ko, c2... For each cell Fnnn which starts with the string "ny...." "ko...." "c2....", i want to assign the NUMBER 1 to its adjacent cell Ennn else a blank value. I had something like this: =IF(ISNUMBER(SEARCH("*ny*",F13)),1,"")
Just not sure how to get additional checks added since it is erroring out....Here is one WAY to do it with an IF test. You said that you want to test if the values in column F start with 2 characters, ny, ko or c2, so the MID(cell,1,2) function will PICK those characters up. Next I do a logical test of the form OR(condition1, condition2, condition3)

Formula in G9 which is copied and pasted down column G is

=IF(OR(MID(F9,1,2)="ny",MID(F9,1,2)="ko",MID(F9,1,2)="c2" ),1,0)




Discussion

No Comment Found