Hi all,
I've have this complex problem here (or so I think) and I'd appreciate if anyone can help. It's gonna be a long explanation, so please bear with me.
I've got 1 column worth of data and each cell contains multiple values seperated by commas. Depending on what the cell contains, I'll need to return a value to the next column.
For illustration's sake, I have 10 rows in Column A, each cell (apart from the header row) has a combination of the following: Chicken, Apples, Duck, Pies, Cakes, Fish, Beef. In column B, the corresponding row will return values based on the following criteria:
Beef, Chicken, Duck, Fish = Meat present. In other words, if any cells in Column A has any of the meat items, the corresponding cell in Column B would show "Meat present".
So, for instance, if Range("A2") has the string "Cakes, Chicken, Pies", Range("B2") should show "Meat present", since "Chicken" is there. On the other hand, if the value in Range("A2") is "Pies, Apples", then Range("B2") should show "No meat", since none of the meat items are found. Note that there is no specific arrangement of the values in Column A, i.e. 1 cell may show "Cakes, Chicken, Pies", while another may show "Chicken, Pies, Cakes"; both should show the same value in Column B.
For a human to do this job, it's intuitively simple: just check the cell for any meat items and return the appropriate value. However, the sheer number of rows in my actual worksheet makes it tedious for human effort and I want to automate this.
Any suggestions on how I should go about approaching this problem? I'd be grateful for any ideas or solutions. Thanks!