DJWheezyWeez
Technical User
The basic idea is this... I have a blank spreadsheet with a macro that pulls variance information from other spreadsheets, copies it to the blank spreadsheet all on their own tab, makes pivot tables, etc etc. I have 4 tabs, one for the current variance as of the time I run the report to find it, one which holds the previous month's variance, a calculation tab to compare the two, and a final version tab that sorts out the differences into a more readable format.
What I'm trying to do now is write something that says if the month on the previous month tab is one less than the current month, then do nothing, else copy/paste information from a new spreadsheet to the previous month tab.
For example, let's say the previous month tab information is for February. When I run the macro, I want it to look at that month and see that February is 1 less then March (current month) and do nothing. Now let's say it's April and I run the macro. I want it to see that February is now 2 less than April and then open a new spreadsheet which contains end of March variances, copy and paste all that information into the previous month tab of the main spreadsheet overwriting the old information.
If this makes sense to anyone and it's not just rambling, does anyone have any suggestions? The way I'm thinking of this is something like if cell x-1 is equal to cell y then run macro a else run macro b.
Any help is greatly appreciated and thank you in advance
-DJWW
What I'm trying to do now is write something that says if the month on the previous month tab is one less than the current month, then do nothing, else copy/paste information from a new spreadsheet to the previous month tab.
For example, let's say the previous month tab information is for February. When I run the macro, I want it to look at that month and see that February is 1 less then March (current month) and do nothing. Now let's say it's April and I run the macro. I want it to see that February is now 2 less than April and then open a new spreadsheet which contains end of March variances, copy and paste all that information into the previous month tab of the main spreadsheet overwriting the old information.
If this makes sense to anyone and it's not just rambling, does anyone have any suggestions? The way I'm thinking of this is something like if cell x-1 is equal to cell y then run macro a else run macro b.
Any help is greatly appreciated and thank you in advance
-DJWW