[Solved] Standard filter multiple condtitions

Discuss the spreadsheet application
Post Reply
marcihun
Posts: 4
Joined: Thu Aug 16, 2018 11:34 am

[Solved] Standard filter multiple condtitions

Post by marcihun »

Is there a way using standard filter the way like this: coumn A = 1 AND (coumn B = 'x' OR column B = 'y').
Last edited by Hagar Delest on Thu Aug 16, 2018 9:56 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1 on Windows 10
Alex1
Volunteer
Posts: 726
Joined: Fri Feb 26, 2010 1:00 pm
Location: Netherlands

Re: standard filter multiple condtitions

Post by Alex1 »

Welcome to the forum!

It doesn't seem to work in whatever order I specify the criteria. Parentheses cannot be used; AND has a higher priority than OR. If you use LibreOffice it's easy to achieve using the autofilter.
AOO 4.1.15 & LO 24.2.2 on Windows 10
marcihun
Posts: 4
Joined: Thu Aug 16, 2018 11:34 am

Re: standard filter multiple condtitions

Post by marcihun »

Thank you Alex! I've just changed to LibreOffice, and you were right, it has the function I was looking for.
OpenOffice 4.1 on Windows 10
User avatar
keme
Volunteer
Posts: 3705
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: standard filter multiple condtitions

Post by keme »

You can do it in OpenOffice Calc too.

In the Standard Filter dialog, click the More options button and tick regular expressions.
Condition:

Code: Select all

    A = 1
AND B = x|y
marcihun
Posts: 4
Joined: Thu Aug 16, 2018 11:34 am

Re: standard filter multiple condtitions

Post by marcihun »

If I ckeck the option regular expression, nothing happens, so there is not any input field I could type in.
OpenOffice 4.1 on Windows 10
marcihun
Posts: 4
Joined: Thu Aug 16, 2018 11:34 am

Re: standard filter multiple condtitions

Post by marcihun »

OK. I found it, I have to use the dropdown field.
It is a little strange and not a common way of using a dropdown anyway. So, I can click on this field, and insted of picking an option from the drop down list (options related to that column) I can directly type in this field. Thanks, it works too, so now I can go back to OpenOffice Calc as well.
OpenOffice 4.1 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: standard filter multiple condtitions

Post by Villeroy »

The database component Base can do this easily, even with spreadsheet data.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Standard filter multiple condtitions

Post by Villeroy »

One more thing: You can merge arbitrarily complex criteria in a calculated field and filter that, e.g.
=AND($A2=1 ; OR($B2="x" ; $B2="y"))
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply