Hello everyone, I'm trying whithout success to loop through worksheets hope you can help me
I have a workbook with 40 worksheets of my employes
The 40 worksheets of employes have those names
10 worksheets are for the first group : 22-01, 22-02 ... 22-10
10 worksheets are for the second group : 23-01, 23-02 ... 23-10
10 worksheets are for the third group : 24-01, 24-02 ... 24-10
10 worksheets are for the fourth group : 25-01, 25-02 ... 25-10
On every worksheet that has an active employe, the cell P4 has the same code of the worksheet, and if it has no employe it has a "XX-XX" (means there is no employe on this worksheet).
I want a macro that activate the next worksheet if cell P4 is different of "XX-XX", if not go to next worksheet until cell P4 is different of "XX-XX" and so on.... and lastly, if the macro runs and it reach the end (the worksheet 25-10) then start it over again with the 22-01 worksheet.
This is because today I have 18 employes, and it varies on the year, and everytime I need to add something I loop it manually (CTRL+PAGE UP or DOWN) till I find the next employe, so I want to place two buttons on every worksheet and when I click one it activate the next used worksheet and the other go to the previous used worksheet.
I all ready try the do until loop but it does not work, well I mean I can't make it work
I have a workbook with 40 worksheets of my employes
The 40 worksheets of employes have those names
10 worksheets are for the first group : 22-01, 22-02 ... 22-10
10 worksheets are for the second group : 23-01, 23-02 ... 23-10
10 worksheets are for the third group : 24-01, 24-02 ... 24-10
10 worksheets are for the fourth group : 25-01, 25-02 ... 25-10
On every worksheet that has an active employe, the cell P4 has the same code of the worksheet, and if it has no employe it has a "XX-XX" (means there is no employe on this worksheet).
I want a macro that activate the next worksheet if cell P4 is different of "XX-XX", if not go to next worksheet until cell P4 is different of "XX-XX" and so on.... and lastly, if the macro runs and it reach the end (the worksheet 25-10) then start it over again with the 22-01 worksheet.
This is because today I have 18 employes, and it varies on the year, and everytime I need to add something I loop it manually (CTRL+PAGE UP or DOWN) till I find the next employe, so I want to place two buttons on every worksheet and when I click one it activate the next used worksheet and the other go to the previous used worksheet.
I all ready try the do until loop but it does not work, well I mean I can't make it work