View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Combine text under different condition

On Sun, 25 Mar 2012 10:45:50 +0000, chasiubao wrote:


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))