Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Stuck with a google sheets IF formula for generating boolean strings

$
0
0

I've been looking for a solution everywhere, but have been unsuccesful.

I'm trying to make a formula on google sheets, that would help me utilize all added keywords from a column B into a sourcing boolean string, that would include OR and "". (Example "Keyword1" OR "Keyword2" OR "keyword 3" ).

So far, I was able to come up with this, which starts from field B8(based on my doc):

=IF(B8<>"",""""&B8&"""","")&IF(B9<>""," OR "&""""&B9&"""","")&IF(B10<>""," OR "&""""&B10&"""","")&IF(B11<>""," OR "&""""&B11&"""","")&IF(B12<>""," OR "&""""&B12&"""","")&IF(B13<>""," OR "&""""&B13&"""","")&IF(B14<>""," OR "&""""&B14&"""","")&IF(B15<>""," OR "&""""&B15&"""","")

But, the problem that I'm facing, is that if I want to increase the number of keywords beyond 8, I have to manually create every new IF line, one by one, which would take lot of time (let's say I would have over 500 keywords that I'd like to use and I would need to create 500 BNUMBER lines....).

Is there any way to remodify this formula, so that it would include all the keywords that were pasted in the column, no matter the number, or to somehow auto-generate the formula to let's say, B1000?

Your help would be super appreciated.

Thank you,Dean


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>