Combine text under different condition

C

chasiubao

Hi! I've a question about how to combine text under certain condition.
I would like to generate combine text result in column G given tha
column A to E are not equal to 0. Column A to E have value of eithe
text or 0.

Example: G1 will have the result as ND LCSD, G3 will be TP LCSD...etc.

A B C D E F G
0 ND LCSD 0 0 0
0 ND LCSD 0 0 0
TP 0 LCSD 0 0 0

Does anyone knows how to write the formula to generate the result in G?

Many thanks!!
 
C

Claus Busch

Hi,

Am Sun, 25 Mar 2012 10:45:50 +0000 schrieb chasiubao:
Example: G1 will have the result as ND LCSD, G3 will be TP LCSD...etc.

A B C D E F G
0 ND LCSD 0 0 0
0 ND LCSD 0 0 0
TP 0 LCSD 0 0 0

try:
=TRIM(SUBSTITUTE(A1&" "&B1&" "&C1&" "&D1&" "&E1&" "&F1,0,""))


Regards
Claus Busch
 
R

Ron Rosenfeld

Hi! I've a question about how to combine text under certain condition.
I would like to generate combine text result in column G given that
column A to E are not equal to 0. Column A to E have value of either
text or 0.

Example: G1 will have the result as ND LCSD, G3 will be TP LCSD...etc.

A B C D E F G
0 ND LCSD 0 0 0
0 ND LCSD 0 0 0
TP 0 LCSD 0 0 0

Does anyone knows how to write the formula to generate the result in G?

Many thanks!!!

Straightforward concatenating IF's:

G1: =TRIM(IF(A1=0,"",A1)& IF(B1=0,""," "&B1)&IF(C1=0,""," "&C1)&IF(D1=0,""," "&D1)&IF(E1=0,""," "&E1))
 

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