Hello,
I'm trying to use WorksheetFunction.lookup in some VBA code. I can get the following to work
It also works if I reference a single cell like belowPlease Login or Register to view this content.
It looks for the word ODD in column AP and gives me whats in column AN if it finds a match. However, If I try to switch out the string ODD with a cell it gives me the following error (Run-time error '1004'Please Login or Register to view this content.
So if I try to switch it out for a cell value like below
I get the error. ct is just a counter which normally works when using Range.Please Login or Register to view this content.
I know that the counter is fine because I am using it in the same block of code. Is there a way I can use a variable with WorksheetFunction.lookup?
Bookmarks