I am creating a macro in LibreOffice Calc and need a way to select some non-consecutive cell ranges, and capture which are those selected ranges. For example, I want to select the intervals "A1: A10", "C5: C13", "H7: H9" and to be able to capture these three strings, to be able to apply some action where I selected. I have already created the macro below, to be able to do a "replace" in the selected cells, but it only works in a single interval. Thanks for any tips.