Hi everyone,
I am trying to make some code that would help me categorize various credit card transactions. The credit card transaction data is in the attached input.csv - now my goal is to add a new column, which shows which store the credit card has been used in - see output.csv. As the data in the "Item" column comes in all kinds of formats (e.g. sometimes store name is in the beginning of the string, sometimes in the end, sometimes in the middle), I am currently using the "Contains" function and a bunch of IF statements to search for the desired words in the "Item" column. That works, but as I am now looking for a growing list of +25 different store names, I have a pretty long set of nested IF statements (see attached code).
s there a smarter way to do this? Any input would be highly appreciated.