I have a worksheet in which a cell has 4 lines of data. Each bit of data is put on a new line within the cell using CHAR(10). Sometimes only 2 of the lines are TRUE and therefore only 2 text lines appear within the cell. However, the CHAR(10) function still inserts line breaks between the empty lines. How do I get Excel to skip the line breaks which do not have any data that follow them? I've tried the CLEAN, SUBSTITUTE, TRIM, FIND, REPLACE functions to no avail.
Example: The output if all data within the cell is TRUE based on the formula =A1&CHAR(10)&B1&CHAR(10)&C1&CHAR(10)&D1 looks like this:
Apple
Banana
Orange
Peach
However, if B1 and C1 are not true, the output looks like this (2 blank links between apple and peach):
Apple
Peach
How do I get it to look like this (the blank lines are omitted)?
Apple
Peach
Many thanks in advance
Example: The output if all data within the cell is TRUE based on the formula =A1&CHAR(10)&B1&CHAR(10)&C1&CHAR(10)&D1 looks like this:
Apple
Banana
Orange
Peach
However, if B1 and C1 are not true, the output looks like this (2 blank links between apple and peach):
Apple
Peach
How do I get it to look like this (the blank lines are omitted)?
Apple
Peach
Many thanks in advance