I'm trying to compare in VBA two tables that are on the same sheet. The first table called "tableQ" and is in column "Q" (only one column wide) and starts in row 5 but ends in row 200. With no duplicates but many empty cells. Values are entered by way of a comboboxT userform that removes that value that is selected for the chosen cell in column "Q”, so that there are no duplicated values.
The other table is called "MasterT" and is in column "T" and starts in row 5 but ends at row 30. Values are entered and are use as a list for that comboboxT.
I'm comparing TableQ to the MasterT to see if a value in the MasterT has been used somewhere in the TableQ.
I've tried both vlookup and index/match but at this point I'm doing the old 'one step forward and two steps back'. HELP
My last attempt was (and of course it didn't work)(I would list all but there isn't space)
The other table is called "MasterT" and is in column "T" and starts in row 5 but ends at row 30. Values are entered and are use as a list for that comboboxT.
I'm comparing TableQ to the MasterT to see if a value in the MasterT has been used somewhere in the TableQ.
I've tried both vlookup and index/match but at this point I'm doing the old 'one step forward and two steps back'. HELP
My last attempt was (and of course it didn't work)(I would list all but there isn't space)
VBA Code:
With ShGE03 'ShGE03 is the worksheet codename
Dim tableQ as range
Set tableQ = .Range("Q5:Q200")
Dim MasterT as Range
Set MasterT = .Range("T5:T30")
.Range("U5:U30").Formula = "=IFERROR(VLOOKUP(T5,tableQ,2,FALSE),""Not Used"")"
End With