Dear all,

I am working on a project to easily assign requests to team members depending on keywords. I haven't coded loops in VBA for quite a while and am a little rusty, hence I would need some help!

I want to program an "auto assignment" macro based on pre-established criterias.

On Tab 1 - the criterias to be used (team member in charge of...)
On Tab 2 - the data I want to assign to each team member

tab1.PNG

tab2.PNG

For each items in Tab 2 colomn B - I would like the macro the run all possibilities :

- For Tab2 B2 : if B2 contains Tab1 B2 > insert Tab1 A2 in Tab2 A2
if not > if B2 contains Tab1 B3 > insert Tab1 A3 in Tab2 A2
if not > if B2 contains Tab1 B4 > insert Tab1 A4 in Tab2 A2

> If a matching keyword is found; move to next line item (B3)
> If the description does not contains any matching keywords; insert nothing and move to next line item (B3)

In the end, Tab 2 should be filled as follow :

tab2result.PNG

Many thanks in advance for helping me making this macro !