Reputation: 119
I have a array of values that are states {"OH","VA","CA"} and an array of Boolean values {TRUE, FALSE, TRUE} and want to concatenate all the states that correspond to TRUE, so in this example my result would be "OHCA." Company policy does not allow the use of VBA (dumb, I know), so I'm trying to use an array formula. Any idea how to make this work?
Upvotes: 1
Views: 3589
Reputation: 1
I allow myself to suggest this answer, that gives an answer to the title question and not to the question text because it shows in top results and I suspect it is a common topic.
A simple and elegant way to do this: =FILTER({"OH","VA","CA"}, {TRUE,FALSE,TRUE})
For the text case, just apply CONCAT() to the above suggestion.
Upvotes: 0
Reputation:
As an array formula with CSE,
=CONCAT(IF({TRUE,FALSE,TRUE}, {"OH","VA","CA"}, TEXT(,)))
Upvotes: 3