I'm trying to run an If statement that can only run if the worksheet exists.
Any help would be much appreciated.
Below is my code:
![]()
Please Login or Register to view this content.
I'm trying to run an If statement that can only run if the worksheet exists.
Any help would be much appreciated.
Below is my code:
![]()
Please Login or Register to view this content.
Hi there,
Let me know if the following meets your needs:
HTH![]()
Please Login or Register to view this content.
Robert
Robert,
Thanks for your help. The code definitely works.
I have a macro for each month of the year with a number of formulas that are calculated monthly on the worksheet, if it exists. However, when I tried to incorporate all of these macros into one, it only gives me the formulas for the very first worksheet it finds. I'm thinking that I will need a For Loop to search for the worksheet and if it exists, then it will calculate the formulas. Let me know what you think.
In the code I've included below, I'm trying to calculate the formulas for the previous months. Yet, if June is found, it will only compute June's formulas rather than do April, May, June, etc.
Thanks for all your help.
J.
![]()
Please Login or Register to view this content.
Hi there,
Glad to hear the macro worked (well almost).
It's probably a bit 'clunky', but see if the following does the trick - I've adjusted each of the 12 formulas based on the example you provided, change them if they don't suit:
HTH![]()
Please Login or Register to view this content.
Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks