Avatar of Karen Schaefer
Karen Schaefer
Flag for United States of America asked on

Remove Null values from Concatenate string

Handling NuLL in a concatenated statement.

How do I remove any values containing "NULL".

I am trying to concatenate the Type and size into a single value, however, some of the size = "Null".

I want to remove the Null from the concatenated values.

TYPE       Size          Final value
varchar      8      NO      varchar(8)
varchar      10      NO      varchar(10)
datetime      NULL      NO      datetime(NULL)
varchar      40      YES      varchar(40)
varchar      50      YES      varchar(50)
varchar      25      YES      varchar(25)
varchar      25      YES      varchar(25)
varchar      17      YES      varchar(17)
varchar      50      YES      varchar(50)
varchar      40      YES      varchar(40)
varchar      40      YES      varchar(40)
varchar      10      YES      varchar(10)
varchar      36      YES      varchar(36)
varchar      36      YES      varchar(36)
datetime      NULL      YES      datetime(NULL)
datetime      NULL      YES      datetime(NULL)
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Subodh Tiwari (Neeraj)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Karen Schaefer

ASKER
=SUBSTITUTE(A2&"("&B2&")","(NULL)","")  Did the Trick.

Thanks,
Subodh Tiwari (Neeraj)

You're welcome Karen! Glad it worked as desired.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck