I have a weird issue with the match function in excel. I have an excel process scope which checks if a given name of the variable is present in the file. If the name exists, it performs a set of activities in the If block, whereas if it’s not found, then it opens notepad and includes the first name of the person in the Else block. I had no issue whatsoever previously, but now for unknown reason, it’s throwing an error in the If block where I have the Read Cell Value activity that says: “Read Cell Value: The range B-1 does not exist.” The name indeed does not exist since the address position is not found, so it should had jumped to the Else block but it didn’t. What might be causing this?
Edit: The match function is surrounded with a Try Catch. And if the name is not found, then in the system exception, I have an Assign activity set to NameExists = False. Above the try catch, the same Assign activity is set but to True.
If an error occurs in the match function, it does not throw the system exception and update the variable NameExists to False. And if I remove the assign NameExists = True above the Try Catch, then all loops will result in being false even if they are indeed True which is still wrong.
The match function does not throw any errors. It’s the read cell activity that does which is inserted in the If block. I disabled the try catch and still the error is the same. Read Cell Value: The range B-1 does not exist.
Yes you’re 100% right. That made it work. I did not know that the match activity does not throw any errors. Guess its because Continue on error is not an option. I removed the try catch and deleted the variable NameExists and added the
to the If condition. Works well now. Thanks. Marked as solved.