Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LibreOffice Calc: Filter via Macro?..

I want a macro to filter a range looking for lines that contain a certain substring.

The substring I'm looking for is stored in a certain cell. I would prefer to store it in a TextBox, but apparenty there's no way to access the contents of a TextBox from a macro without linking it to a cell and reading from that cell. I've seen that question asked several times, but the only answer was "Just link it to a cell and read from that cell and be happy with that".

QUESTION 1. It it really possible to read directly from a TextBox placed on the spreadsheet, without linking it to a cell? I've tried to "Record a macro" (in order to see at least something interesting) and modify the contents of the TextBox, but that change was completely IGNORED, even when the TextBox WAS linked to a cell!!.. I thought at least the changes in the cell would be recorded...

QUESTION 2. What kind of "search operator" should I use to look for lines that "CONTAIN" the substring ?..