Return ROW(S) only selection from non-contiguous range using Areas.

  • I think I'm half way there, I've found various rather complex solutions while googling but I'm pretty sure there's an easier way than what I'm doing.


    As shown in the screenshots, I'd like the user to select rows by picking cells, then the macro to return from those selections a series of rows, and colour them.


    I've got as far as getting a string with the row numbers in, but I can't find a good example of the syntax to reference this in a row selection.



    [ATTACH=CONFIG]69477[/ATTACH]
    [ATTACH=CONFIG]69476[/ATTACH]

  • Re: Return ROW(S) only selection from non-contiguous range using Areas.


    Try this.


    There's probably an easier way to do it, but this is what I came up with. :cool:


  • Re: Return ROW(S) only selection from non-contiguous range using Areas.


    That's some next level stuff with the RegEx!


    You also answered my next question - which was going to be how to set the rightmost boundary of those lines ( the terminating column ) by picking the furthermost right cell from the various selected areas. :)


    In the interests of sharing. I added in variables for colour - so if anyone wants to do the same thing and finds this thread - it may be of some use.


    I added four buttons to add three colours, and a fourth to clear the colours - highlights are done via pattern 50% grey - so don't interfere with the existing formatting of the sheet.



    Thanks again skywriter. :)

  • Re: Return ROW(S) only selection from non-contiguous range using Areas.


    Do you mean like this?


  • Re: Return ROW(S) only selection from non-contiguous range using Areas.


    Quote from S O;772917

    Do you mean like this?



    I knew there had to be an easier way, thanks. :cool:

    Bruce :cool:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!