How to type text in combined cell?

E

Eric

Does anyone have any suggestions on how to type text in combined cell?
For example, when I join A1 and A2 cells together, and enter a formula
If true, then type the text A at top and M at bottom, which looks like
following
A
M
in combined cell A1 and A1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
M

Max

Presume you meant something like this?

If A1 contains: A, A2 contains: M,
A3 to return it as:
A
M

If so, first, format A3 to wrap text,
via Format>Cells>Alignment tab>Check Wrap Text

Then place in A3: =A1&CHAR(10)&A2

If you meant just how to break for a new line in a cell when entering data
manually, just press Alt+ENTER where you want to break it.
 
E

Eric

I don't mean type it manually, I need to set a cell formula , if the
condition is true then return
A
M
else "".
Do you have any suggestions?
Thank you very much for any suggestions
Eric
 
M

Max

I don't mean type it manually, ..
Ok, but I did give you 2 options earlier,
and with the formula option explained ahead??

One last go here,
with A3 pre-formatted to wrap text (this formatting is required)

Try something like this in A3:
=IF(COUNTA(A1:A2)=2,A1&CHAR(10)&A2,"")
where A1:A2 will contain the text to be combined: A, M

Or, perhaps something like this in A3:
=IF(COUNTA(A1:A2)=2,"A"&CHAR(10)&"M","")
which will give the desired "fixed" text return:
A
M
if the condition checked is TRUE, else "" (as you stipulated)
 
E

Eric

Thank you for your reply
I would like to return both chars in combined cell A1 & A2
If this is true, then return A in cell A1 and M in cell A2, but A1 and A2
are combined cell, which show as below
A
M
Do you have any suggestion?
Thank you very much for any suggestion
Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top