Forum Discussion

Eric We™'s avatar
Eric We™
Copper Contributor
Sep 27, 2018

Need help in Excel Formula

Hi,

 

Suppose I have two hundred thousend rows. Each row has car model entries. I would like to write a formula in column B to determine only the model column A belongs to. The formula will just lookup up the exact model in column A from the list of all models available.

 

e.g:

 

Column A                    Column B

Focus 1.5G GAS A         Focus

Focus 1.3E GAS M         Focus

Golf 1.3 GAS M             Golf

Golf1.5 GAS M              Golf

Golf2.0 GAS AT             Golf

X3xdrive201 BMW        X3

 

4 Replies

  • Lorenzo Kim's avatar
    Lorenzo Kim
    Bronze Contributor

    would you kindly attach a non sensitive file for the people here to better understand your need.

    thanks..

  • Lorenzo Kim's avatar
    Lorenzo Kim
    Bronze Contributor
    as I see it, you want column B to get the left string letters only?
    if it is separated by a space or comma (delimiter) - it would be quite easy - but
    X3xdrive201 BMW - this would be a problem....
    • Eric We™'s avatar
      Eric We™
      Copper Contributor
      Thanks for the reply. No i dont need to extract the left string only. The model name is randomly positioned. It could be in the middle or right. Thats why i need a search function?
      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        If list of models is in column E as here

        that could be array formula (Ctrl+Shift+Enter)

        =INDEX($E$1:$E$3,MATCH(1,--ISNUMBER(SEARCH($E$1:$E$3,A1)),0))

        and attached

Resources