Hi,
I was given this bit of code to run a V Look up from within VBA as opposed to a front end spreadsheet. It works well, but I need to add 2 more names and their departments to their code but I am struggling.
Here it is now in functioning order with only 3 names and departments:
eg
NAME | DEPARTMENT
James | Electrical
Eric | Moulding
Liam | Paintwork
Sarah | Metalwork
Matthew | Woodwork
I would like the names and departments in blue (Sarah and Mathew) to be added to the code, but I can't get it to work...Worksheets("Data").Range("F" & ThisRow.Row).FormulaR1C1 = _ "=IF(ISNUMBER(SEARCH(""James"",RC[-2])),""Electrical""," & _ " IF(ISNUMBER(SEARCH(""Eric"",RC[-2]))," & _ " ""Moulding"",IF(ISNUMBER(SEARCH(""Liam"",RC[-2])),""Paintwork"","""")))"
Bookmarks