Home » excel » excel – Trim values in array?

excel – Trim values in array?

Posted by: admin May 14, 2020 Leave a comment

Questions:

The match excel function takes an array or table as second parameter. Is there a way to trim the values of the array before feeding to match function?

I am looking for something like:

=MATCH("bat", TRIM(A1:A12), 0)

Thanks!

How to&Answers:

It will work as an array formula:

enter image description here

Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. If this is done correctly, the formula will appear with curly braces around it in the Formula Bar.