Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Combine text under different condition

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!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Combine text under different condition

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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Combine text under different condition

On Sun, 25 Mar 2012 15:52:49 +0200, Claus Busch wrote:


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


Nice. I like that approach.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine more than one condition for CONDITIONAL FORMATTING Asoka Walpitagama - Brandix College IT Excel Discussion (Misc queries) 1 November 11th 09 04:10 PM
Combine text Lisa Excel Discussion (Misc queries) 4 May 1st 07 10:32 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
How can I combine text from several cells into one? Michael Excel Discussion (Misc queries) 5 January 16th 07 10:25 PM
Combine Two vba Lines(If Condition + Vlookup) helmekki[_86_] Excel Programming 3 August 3rd 05 04:12 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"