- Joined
- Mar 27, 2008
- Messages
- 6,639
I would like to know if anyone has a simple macro that returns a true if a selected range is not contiguous.
The idea is, I have a workbook with one sheet for every month where tasks, vacation etc are kept and planned.
You can select a range or several ranges (see attached bmp file) and usign the Right mouse button it permits the user to enter a 'V' for vacation in that selected range or ranges
What I am looking for now is if in case the range is not contiguos I want to be able to determine where each different range starts and ends (that I can do with some code I already have for a contiguous range) but now I would like the code to return the three anges
"A4:B5" "C6:E7" "F8:J10"
Then I execute the appropiate code to enter, format or whatever each cell in the separate ranges, the actions will be same but skippng the not selected cells.
Maybe something like not in selection?
It's difficult to attach the workbook I'm using since I don't have an empty one at hand right now, but I'm preparing one.
It's easier to prgram than to explain what I want.
Thanks in advance for any tip
The idea is, I have a workbook with one sheet for every month where tasks, vacation etc are kept and planned.
You can select a range or several ranges (see attached bmp file) and usign the Right mouse button it permits the user to enter a 'V' for vacation in that selected range or ranges
What I am looking for now is if in case the range is not contiguos I want to be able to determine where each different range starts and ends (that I can do with some code I already have for a contiguous range) but now I would like the code to return the three anges
"A4:B5" "C6:E7" "F8:J10"
Then I execute the appropiate code to enter, format or whatever each cell in the separate ranges, the actions will be same but skippng the not selected cells.
Maybe something like not in selection?
It's difficult to attach the workbook I'm using since I don't have an empty one at hand right now, but I'm preparing one.
It's easier to prgram than to explain what I want.
Thanks in advance for any tip