This code has a lot of problems for such a short bit of code. I can't get it to compile because of syntax errors.
That error suggests that you are using syntax to reference an array, but the variable is not declared as an array. I am not getting the same error.
What is it supposed to do? Giving us a part # and assignment # is not helpful since we don't know what that refers to.
It appears that you are trying to set the fill color in cells in columns A:C if some condition is met. But I can't make sense out of anything in your If condition.
identifier is a String variable. Your condition starts with identifier( but that doesn't make sense. There is no matching parenthesis, and there is no syntax for putting a ( after a String variable.
You refer to Range(ID) but ID is never given a value.
You are comparing it to Range("identifier") but it's not clear if you intend for this be the variable identifier, or if you have a named range called identifier in your file.
Same problem with Range("key")
If you intend for these to be references to your variables, do not use quotes. Also those variable are never given values.
You are comparing Range(ID) to both Range("identifier") And Range("key"). This condition will be TRUE only if all three are the same.
Because you have the action after the Then on the same line, you do not need the End If afterwards.
Bookmarks