Macro to create multi-value Calc FilterDescriptor

The response from @sokol92 is what I expected and where I may end up in the near term: Adding a column, adding a formula, and filtering on the formula result.

But the reply from @Villeroy is intriguing. However, when I use the Calc menu: Data > Refresh Range, I receive a pop-up:

Error accessing data source ‘FilterData’:
com.sun.star.container.NoSuchElementException:
FilterData

So I conclude I need to declare/define/configure some ‘data source’ named Filter Data? I’m doing all this work using LibreOffice v25.2.3.2 if that makes a difference.

Sorry, I imported dummy data from one of my databases. You can’t refresh that range because you can’t pull data from my dummy database.

  1. Call Data>Select and select Import1
  2. call Data>Define… and delete Import1.
  3. In the same dialog, define a new unlinked database range based on the current selection. Just enter some name.
  4. Data>More Filters>Advanced… pick “Days_of_Year” from the list box.

Now the database range’s filter descriptor is linked to the named criteria range “Days_of_Year”. Change the year and refresh the database range.

Thanks a bunch @Villeroy. I’ve not used the Spreadsheet Data features very much before, so they were foreign to me. But your instructions worked as advertised. I’ll spend some more time with this.

(post deleted by author)

Virtually everybody tries very hard to use Calc and Excel as a cheap database surrogate.
This requires the following:

  • Some level of proficiency with spreadsheet applications and how to stretch their built-in features (SUMPRODUCT, VLOOKUP, MATCH, INDEX, D-functions, absolute/relative referencing, maintenance of expanding references).
  • Knowing all the database functionality provided by the spreadsheet application, that is everything in Calc’s Data menu, i.e. sorting, filtering and pivot tables.
  • Some level of proficiency with databases, because with a spreadsheet the design principles are exactly the same, though very limited.
  • Macro programming is the very last thing you need to know.