Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Concatenate plus dashes

1,613 views
Skip to first unread message

DL

unread,
Sep 30, 2003, 10:55:54 AM9/30/03
to
I am using the concatenate function and want a dash "-"
between each entry and no if the cell is empty, no dash.

Example:
>=CONCATENATE(A1,B1,C1,D1,E1)

I want the end result to be as follows:

A1 - B1 - C1- E1

A1 IS TEXT, B1 IS TEXT, ETC.

Gerry Kuta

unread,
Sep 30, 2003, 11:40:29 AM9/30/03
to
Try something like
=CONCATENATE(A1&" - "&B1&" - ")etc.

>.
>

Paul

unread,
Sep 30, 2003, 12:12:29 PM9/30/03
to
"DL" <deb...@chemtreat.com> wrote in message
news:1cab01c38762$f2b24520$a401...@phx.gbl...

CONCATENATE is a redundant function. You can just use & between the text
strings:
=A1&B1&C1&D1&E1

To get hyphens in between:
=A1&"-"&B1&"-"&C1&"-"&D1&"-"&E1

To get hyphens and spaces:
=A1&" - "&B1&" - "&C1&" - "&D1&" - "&E1


DL

unread,
Sep 30, 2003, 1:50:07 PM9/30/03
to
I'm sorry, but where do I put the "-" in each of the
following, which includes the IF function:

=CONCATENATE(IF(D12=0,"",D12),IF(E12=0,"",E12),IF
(F12=0,"",F12),IF(G12=0,"",G12),IF(H12=0,"",H12),IF
(I12=0,"",I12),IF(J12=0,"",J12),IF(K12=0,"",K12),IF
(L12=0,"",L12),IF(M12=0,"",M12),IF(N12=0,"",N12),IF
(O12=0,"",O12),IF(P12=0,"",P12))

>.
>

DL

unread,
Sep 30, 2003, 2:00:32 PM9/30/03
to
I got the dashes to work...

=CONCATENATE(IF(D12=0,"",D12),+"-",IF(E12=0,"",E12),+"-",IF
(F12=0,"",F12),+"-",IF(G12=0,"",G12),+"-",IF(H12=0,"",H12)

but... how do I make an IF statement to leave out the
dashes if the value is 0.
Example: =CONCATENATE(IF(D12=0,"",D12),+"-"
but only if there is a value... no dash if D12=0.

>.
>

0 new messages