How do I make one cell with text from multiple cells?

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
using 365

I have 3 cells F22,F27,G28....I manually plug text into these cells.

I need all three text to show up in one cell, separated with commas.

I do not need to have "N/A" show up if that's one of the plugs in the 3 cells above.

For example I can have in the 3 cells:

F22= TEST 1
F27= TEST 2
G28= TEST 3

The cell with the formula would show up as TEST 1, TEST 2, TEST 3

and If I have this:

F22= TEST 1
F27= N/A
G28= TEST 3

The cell with the formula would show up as TEST 1, TEST 3...basically im eliminating all N/A's from the string of text
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hello,
Try this formula:
=IF(F22="N/A",F27 & " , " & G28,IF(F27="N/A",F22 & " , " & G28,IF(G28="N/A",F22 & " , " & F27,F22 & " , " & F27 & " , " & G28)))
 
Upvote 0
I have this but it doesn't eliminate the N/A's

=F22&","&F27&","&G28
 
Upvote 0
How about
Excel Formula:
=TEXTJOIN(",",1,SUBSTITUTE(CHOOSE({1,2,3},F22,F27,G28),"N/A",""))
 
Upvote 0
Hello,
Try this formula:
=IF(F22="N/A",F27 & " , " & G28,IF(F27="N/A",F22 & " , " & G28,IF(G28="N/A",F22 & " , " & F27,F22 & " , " & F27 & " , " & G28)))
Its half way working..Im still getting N/A's pop up if I have two N/A's out of the three
 
Upvote 0
How about
Excel Formula:
=TEXTJOIN(",",1,SUBSTITUTE(CHOOSE({1,2,3},F22,F27,G28),"N/A",""))
Thanks! That works....I had to put a space after the comma between the two quotes but besides that it works perfect!

Now that I'm looking at it working, is there a way for the formula that the cell is in to have an existing locked in text and have the 3 choices show up after it?

meaning, in the cell, I want to have this at all times:

Atmosphere:

And once I plug in the three cells it would look like this:

Atmosphere: Test 1, Test 2, Test 3

or maybe

Atmosphere: Test 1, Test 3
 
Upvote 0
How about
Excel Formula:
="Atmosphere: "&TEXTJOIN(", ",1,SUBSTITUTE(CHOOSE({1,2,3},T(F22),T(F27),T(G28)),"N/A",""))
This will also handle cells without text.
 
Upvote 0
Solution
How about
Excel Formula:
="Atmosphere: "&TEXTJOIN(", ",1,SUBSTITUTE(CHOOSE({1,2,3},T(F22),T(F27),T(G28)),"N/A",""))
This will also handle cells without text.
That WORKS!..Thanks!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top