0

I am using google sheets and would like to combine the text in cells of a column to a single cell separated by "OR" (with spaces on either side of the OR" For example

**Column A**
John
Bob
Jim
Donald

would be combined in a single cell as "John OR Bob OR Jim OR Donald" What formula in Google Sheets would I use to accomplish this?

player0
  • 124,011
  • 12
  • 67
  • 124
jon Myers
  • 9
  • 3

2 Answers2

1

try:

=JOIN(" OR ", A1:A4)

0

or:

=TEXTJOIN(" OR ", 1, A:A)

0


if you hit the limit try:

=ARRAYFORMULA(A1&" "&QUERY(IF(A2:A<>"", "OR "&A2:A, ),,999^99))

0

player0
  • 124,011
  • 12
  • 67
  • 124
0

See if this works

=textjoin(" OR ", 1, A2:A)

Change range to suit.

JPV
  • 26,499
  • 4
  • 33
  • 48