Is there a way for <search-value> in the MATCH function to be ANY non-blank value?
I'd like to be able to search a column to find ANY first non-blank value not just the one corresponding to the first argument in the MATCH function. A wild card basically for <search_value>.
Best Answer
-
Lucas, thank you for taking your time to respond. If I understand correctly what you've suggested I'll wind up with multiple values; text in my case. I just want the FIRST any non-blank (text) value from the selected range- as example Column A in your response. If I do join-collect I'd still need to parse it further to grab the first non-blank text from the (potentially) multiple values returned. I tried placing a wildcard * or "*" as the first argument of the MATCH statement along with a 0 for the third MATCH argument (search_type) without success. I'd be nice if MATCH had additional search types e.g. 2=Any (first-non blank) text, 3=Any (first-non blank) numeric and so on.
Answers
-
Hi @BarryO, to clarify, you have two columns, A and B. Column A contains a value you wish to return. Column B is a criteria column, and you want the criteria to be "blank" values?
Basic format:
=JOIN(COLLECT({Column A}, {Column B}, ""), " ")
You can put anything in the " " (the second clause of the JOIN statement) -- this will be added between your return values.
-
Lucas, thank you for taking your time to respond. If I understand correctly what you've suggested I'll wind up with multiple values; text in my case. I just want the FIRST any non-blank (text) value from the selected range- as example Column A in your response. If I do join-collect I'd still need to parse it further to grab the first non-blank text from the (potentially) multiple values returned. I tried placing a wildcard * or "*" as the first argument of the MATCH statement along with a 0 for the third MATCH argument (search_type) without success. I'd be nice if MATCH had additional search types e.g. 2=Any (first-non blank) text, 3=Any (first-non blank) numeric and so on.
-
Lucas your answer did help. Using your concept I was able to get what I needed with the following:
=LEFT(JOIN(COLLECT([WC-Complete]:[WC-Complete], [Room Number]:[Room Number], [Room Number]@row)), 2)
Not a 100% ideal but it gives me what I need. I get the first two characters from the JOIN, can't go more as one of the values returned could ne "No" and grabbing more characters than just two characters could give me a concatenated answer of more than just the first value.
Still I'd like to see MATCH beef-ed up a bit. Again thank you for your time.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives