dont fully understand your setup
is it because C does not exist in the Local table , you would then look at the Imported cost and find C
what happens if both A or B is also in the Imported Cost table
What happens if they do not exist in either table
Are these tables on separate sheets on the same workbook
you could use a lookup with an IF ()
Lookup value in Local - if error lookup value in Imported
=index(local!B:B,match(A2,local!A:A,0)
this will lookup the value from the local sheet table
IFERROR
lookup in Imported sheet
=index(imported!B:B,match(A2,imported!A:A,0)
so you could use a nested IF to include situation where neither exist OR a simple IFERROR
=IFERROR (index(local!B:B,match(A2,local!A:A,0), index(imported!B:B,match(A2,imported!A:A,0) )