Something like this would require VBA unless you have Excel 2016 (with Office 365 subscription) where you can take advantage of the new functions such as TEXTJOIN or CONCAT
So, here is workaround with additional columns
Assuming Data is A2:C8
Enter formula in D2 and pull it across to cell F2 and then down
Formula:
=A$2:A8&IF(A3="",""," OR ")
then formula in G2
Formula:
=CONCATENATE(D2,D3,D4,D5,D6,D7,D8)
then in G3
Formula:
=CONCATENATE(E2,E3,E4,E5,E6,E7,E8)
and in G4
Formula:
=CONCATENATE(F2,F3,F4,F5,F6,F7,F8)
v |
A |
B |
C |
D |
E |
F |
G |
1 |
|
|
|
|
|
|
|
2 |
2210 |
1240 |
7776 |
2210 OR |
1240 OR |
7776 OR |
2210 OR 3320 OR 4430 OR 5540 OR 6650 OR 7780 OR 9940 |
3 |
3320 |
2255 |
6654 |
3320 OR |
2255 OR |
6654 OR |
1240 OR 2255 OR 3465 OR 5670 OR 6780 OR 8760 OR 7845 |
4 |
4430 |
3465 |
5543 |
4430 OR |
3465 OR |
5543 OR |
7776 OR 6654 OR 5543 OR 4433 OR 3322 OR 2230 OR 1120 |
5 |
5540 |
5670 |
4433 |
5540 OR |
5670 OR |
4433 OR |
|
6 |
6650 |
6780 |
3322 |
6650 OR |
6780 OR |
3322 OR |
|
7 |
7780 |
8760 |
2230 |
7780 OR |
8760 OR |
2230 OR |
|
8 |
9940 |
7845 |
1120 |
9940 |
7845 |
1120 |
|
Bookmarks