Hello all. I'm trying to help my brother out with a spreadsheet for work. He's got a list of customers that give him strings for their company name, and he just wants to pull out one word of the name. For instance, a string might contain "AwesomeSauce Corp of America Limited" and he just wants to have "AwesomeSauce" for his purposes. This is fairly easy to handle, he just has a function like such:
=IF(ISERROR(SEARCH("AwesomeSauce",A50,1)),"","AwesomeSauce")
This will print "AwesomeSauce" in the field if AwesomeSauce exists in the string given. However, there are hundreds of companies he gets in and right now I gave him a nested if that works, but is just a mess and there is probably something better. I thought about making a macro for loop that just goes through a list, but I wasn't sure if there was something better that someone might know of. It's difficult to Google this sort of thing because I don't really know what I would search for specifically. Here's what I'm thinking it should do:
Have an array of company names in column Q or something, and then have a function that just searches for each string and puts whichever string is found in the slot, but without a giant number of if statements nested.
This is confusing enough, imagine hundreds of these statements nested.
=IF(ISERROR(SEARCH("AwesomeSauce",A50,1)),=IF(ISERROR(SEARCH("SuperSweet",A50,1)),"","SuperSweet") ,"AwesomeSauce")
I will love you forever if you can help. Thanks.
=IF(ISERROR(SEARCH("AwesomeSauce",A50,1)),"","AwesomeSauce")
This will print "AwesomeSauce" in the field if AwesomeSauce exists in the string given. However, there are hundreds of companies he gets in and right now I gave him a nested if that works, but is just a mess and there is probably something better. I thought about making a macro for loop that just goes through a list, but I wasn't sure if there was something better that someone might know of. It's difficult to Google this sort of thing because I don't really know what I would search for specifically. Here's what I'm thinking it should do:
Have an array of company names in column Q or something, and then have a function that just searches for each string and puts whichever string is found in the slot, but without a giant number of if statements nested.
This is confusing enough, imagine hundreds of these statements nested.
=IF(ISERROR(SEARCH("AwesomeSauce",A50,1)),=IF(ISERROR(SEARCH("SuperSweet",A50,1)),"","SuperSweet") ,"AwesomeSauce")
I will love you forever if you can help. Thanks.