0

In Microsoft Excel 2003, I use the following formula [in cell A2 in a sheet named (Allocation)] to refer to several cells from a sheet named (02Mis)

='02Mis'!$A$4&"/"&'02Mis'!$A$11&"/"&'02Mis'!$A$10&"/"&'02Mis'!$A$9&"/"&'02Mis'!$A$13

as shown in the following images.

enter image description here enter image description here

My question is: how to make each entry appears in a separate line as shown in cell C2 in the top image instead of separated by / as in cell A2.

I mean how to make the separator a new line instead of /

2 Answers 2

1

This can be achieved in quite a few clicks if you follow these steps.

You have a worksheet named "02Mis" just like this sample:

enter image description here

And another worksheet in the same workbook named "Allocation" where you extract the required values at A2 using this:

='02Mis'!$A$4&"/"&'02Mis'!$A$11&"/"&'02Mis'!$A$10&"/"&'02Mis'!$A$9&"/"&'02Mis'!$A$13

which results in a long string of text with / in between.

To get rid of this and to get a new line for each of the / in C2, paste this in C2 and hit 'enter':

='02Mis'!$A$4&CHAR(10)&'02Mis'!$A$11&CHAR(10)&'02Mis'!$A$10&CHAR(10)&'02Mis'!$A$9&CHAR(10)&'02Mis'!$A$13

which will fetch you something like this it is not yet the result you desired for:

enter image description here

Now, after entering the formula in C2, select it giving a left click, click on wrap text and there you will have it:

enter image description here

I hope this helps :)

1
  • @Sanu_012.Thank you very much for your answer.
    – Hany
    May 4, 2020 at 4:36
1

The trick is to use char(10) for line return, in combination with clicking on Wrap Text.

Note that you could simplify the formula with TEXTJOIN, like this formula:

=TEXTJOIN(CHAR(10),TRUE,M4:M10)

This is what I got:

example

If your cells are not sequential, you can separate sequences of cells with ,:

non sequential cells

2
  • @Jean-Francois.Thank you for your answer. I need to concatenate cells which are not sequential. I mean M4,M7,M10. How to modify your code instead of M4:M10
    – Hany
    May 4, 2020 at 4:34
  • See update of my answer May 4, 2020 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .