Filter showing numbers above a number and below a number

I have most of the new functions working but can't seem to get the FILTER function to show numbers in a range. Say numbers above 2 and below 10. It shouldn't be as hard as I'm making it.

FILTER(A,A>2,A<10)

Filters out the numbers below 2 but not the numbers over 10


All help will be greatly appreciated.

Frank

Mac mini (M2 Pro, 2023)

Posted on May 5, 2025 5:47 PM

Reply
Question marked as Top-ranking reply

Posted on May 6, 2025 8:27 AM

You can get away with using multiplication for AND, e.g.,


=FILTER(A,(A≥2)*(A≤10))


But using + for OR as you might in Excel, while it gives the expected results, throws a blue triangle warning 'The formula uses a Boolean in place of a Number'.


The most reliable and readable (though slightly more verbose) approach is to use AND or OR explicitly within a MAP, e.g.,


=FILTER(A,MAP(A,LAMBDA(val,AND(val≥2,val≤10))))


OR works similarly, e.g.,


=FILTER(A,MAP(A,LAMBDA(val,OR(val<2,val>10))))


This approach makes the logic explicit. It also makes it easy to add more conditions as needed.


MAP - Apple Support

LAMBDA - Apple Support

FILTER - Apple Support


SG








8 replies
Question marked as Top-ranking reply

May 6, 2025 8:27 AM in response to franks4business

You can get away with using multiplication for AND, e.g.,


=FILTER(A,(A≥2)*(A≤10))


But using + for OR as you might in Excel, while it gives the expected results, throws a blue triangle warning 'The formula uses a Boolean in place of a Number'.


The most reliable and readable (though slightly more verbose) approach is to use AND or OR explicitly within a MAP, e.g.,


=FILTER(A,MAP(A,LAMBDA(val,AND(val≥2,val≤10))))


OR works similarly, e.g.,


=FILTER(A,MAP(A,LAMBDA(val,OR(val<2,val>10))))


This approach makes the logic explicit. It also makes it easy to add more conditions as needed.


MAP - Apple Support

LAMBDA - Apple Support

FILTER - Apple Support


SG








May 6, 2025 10:19 AM in response to SGIII

Thank you. All of those work. I've never used the LAMBDA Function as I can't really get the use of it in my head. I've watched a lot of videos using it in Excel and Numbers but still don't understand it.


I wish there was a channel or two that did for Numbers what the myriad of channels do for Excel. I thunk that would make it a lot easier for more people to use it.


Frank

May 7, 2025 1:23 AM in response to franks4business

franks4business wrote:

I've never used the LAMBDA Function as I can't really get the use of it in my head.


LAMBDA is new to many of us here. Don't let the Greek name fool you into thinking LAMBDA is more complicated than it is. It's just a container for an inline custom function. Once it's set up and its parameters defined then you can feed it different values.


In my example above MAP feeds it the values in column A one by one, applying the same logic each time.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Filter showing numbers above a number and below a number

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.