G
Guest
I need to create a macro in VBA that will look at a specific cell (which
contains the result of a lookup formula) in an If statement. Basically it
would look at a certian cell, and If that cell had the word "YES", then it
would execute a seprate macro. If not, just continue on it merry way.
I have tried the following and several variations:
Sheets("Print Area").Select
Range("BO8:BO8").Select
If BO8 = YES Then Call PrintBatch
What the program has to do is look at the last entry made in a specific
column (hence the use of the Lookup formula in the cell) and if that entry
says "YES", then to execute the sub routine "PrintBatch". I tried using
Frank Kabel's article on "Getting the Last Value in Range", but I seem to be
stuck on actually using the results of the selected cell and comparing it to
"YES". Any help would be appreciated. I have also ordered the 2 reference
books on VBA programing and commands noted in another thread, but they are
not due to be delivered until next week.
Thanks again for any help.
contains the result of a lookup formula) in an If statement. Basically it
would look at a certian cell, and If that cell had the word "YES", then it
would execute a seprate macro. If not, just continue on it merry way.
I have tried the following and several variations:
Sheets("Print Area").Select
Range("BO8:BO8").Select
If BO8 = YES Then Call PrintBatch
What the program has to do is look at the last entry made in a specific
column (hence the use of the Lookup formula in the cell) and if that entry
says "YES", then to execute the sub routine "PrintBatch". I tried using
Frank Kabel's article on "Getting the Last Value in Range", but I seem to be
stuck on actually using the results of the selected cell and comparing it to
"YES". Any help would be appreciated. I have also ordered the 2 reference
books on VBA programing and commands noted in another thread, but they are
not due to be delivered until next week.
Thanks again for any help.