Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to combine more than one condition for CONDITIONAL FORMATTING | Excel Discussion (Misc queries) | |||
Combine text | Excel Discussion (Misc queries) | |||
Combine an OR condition with an AND condition | Excel Discussion (Misc queries) | |||
How can I combine text from several cells into one? | Excel Discussion (Misc queries) | |||
Combine Two vba Lines(If Condition + Vlookup) | Excel Programming |