How to ignore non numeric values with TAKE function?

Monty85

New Member
Joined
May 6, 2019
Messages
43
Office Version
  1. 365
Platform
  1. Windows
Hi team,

I'm trying to find a solution where I can exclude values that are not numeric from the following formula.

=SMALL(TAKE(VSTACK(range1,range2),-n),1)

I've found some similar scenarios online but i'm struggling to incorporate those into my specific need to have the formula include VSTACK to pick up 2 ranges in separate columns.

Currently the above formula is treating non numeric cells as valid when it calculates the "-n" value to determine the range to look for the smallest value in.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I don't understand what "n" is. At first I thought it was a placeholder for an actual number of rows you put there, but then you said it calculates it. This formula doesn't calculate n. Can you clarify what you mean? Also, why do you need to use TAKE at all?

I suspect you're going to need to use FILTER in some way.
 
Upvote 0
I don't understand what "n" is. At first I thought it was a placeholder for an actual number of rows you put there, but then you said it calculates it. This formula doesn't calculate n. Can you clarify what you mean? Also, why do you need to use TAKE at all?

I suspect you're going to need to use FILTER in some way.

"n" was just a placeholder - sorry i might used the wrong terminology when I said calculates.

In the context of the formula, n = -10. So I want the formula to select the last 10 values from the range.

What i'm struggling with is getting the formula to ignore non-numeric values when it selects/calculates/works out what the last 10 values are.
 
Upvote 0
Tested:

Rich (BB code):
=LET(VS,VSTACK(range1,range2),SMALL(TAKE(FILTER(VS,ISNUMBER(VS)),-n),1))
 
Upvote 0
Solution
Tested:

Rich (BB code):
=LET(VS,VSTACK(range1,range2),SMALL(TAKE(FILTER(VS,ISNUMBER(VS)),-n),1))
Thanks, that seems to work.

If I take away the VSTACK requirement, is this still the simplest way to achieve the result if the source is just from a single range?
 
Upvote 0
Well, it's the simplest way I can think of, but the minute I say that someone else may come along with something simpler.

Fortunately you have 365. Without TAKE and FILTER this gets a lot more complicated.
 
Upvote 1

Forum statistics

Threads
1,215,091
Messages
6,123,062
Members
449,089
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top