Hi miguiax
_ I have a couple of codes for you also
_ Both are of the Workbook_Open() type
_ they must be placed in the ThisWorkbook code Module
This is done as follows:
Alt + F11 to get VB Editor Window, then double click on ThisWorkbook in VBA Project Window
ThisWorkbookCodeModule.JPG
Paste Code in the large Workbook Open Code Window
_.........................
Regarding, what JohnTopley said, my coding assumes for now that you open the workbook on the last day of the Month **
Code 1 will give a result like this, using a simple message box:
MessageBoxCode1.JPG
http://imgur.com/y3MUAfr
Attachment 485977
Code 2 is somewhat more advanced, allowing for more detail as well as for much larger data
This may be somewhat advanced for you. But I include it anyway.
Code 2 will give a result like this, using a UserForm:
UserFormCode2.JPG
http://imgur.com/Fl0jhja
Attachment 485978
Both codes assume that you open on the last day of the month if you want the code to trigger**
** For testing in both codes is a test line
This simulates the situation when you are at the last day of the Month. This causes the code to trigger by every opening.
If you ‘Rem out this code line thus:_..
_.. then the code should only trigger on the last day of the Month
Both codes , if triggered , examine the last Month column data Range
In your uploaded example, this is this range that is examined
Using Excel 2007 32 bit
Row\Col |
O |
3 |
Dezembro |
4 |
2 |
5 |
3 |
6 |
1 |
7 |
2 |
8 |
3 |
9 |
1 |
10 |
2 |
11 |
3 |
12 |
1 |
13 |
2 |
14 |
3 |
15 |
1 |
16 |
2 |
17 |
3 |
18 |
1 |
19 |
2 |
20 |
3 |
21 |
1 |
22 |
2 |
23 |
3 |
24 |
1 |
25 |
2 |
26 |
3 |
27 |
1 |
28 |
2 |
29 |
3 |
30 |
1 |
31 |
2 |
32 |
3 |
33 |
1 |
34 |
2 |
35 |
3 |
Worksheet: Data Control Sheet
_............
Each code I explain briefly in the next two posts:
Bookmarks