+ Reply to Thread
Results 1 to 3 of 3

Can't Find Simple "Cell Content" Conditional Statement for Blank Cell

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Burbank, Ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Can't Find Simple "Cell Content" Conditional Statement for Blank Cell

    New to all this, so please excuse the beginner question: I am building a small contact database and want to concatenate two address entries. As you might expect, I need a comma after the the first entry with a space following. The problem is that in most cases, there will not be a second address, i.e., that cell will be blank. If I add the comma by concatenating a comma and space between the two address entries, for example, =(b4&", "&g4), then the comma shows up whether there is a second address or not.

    It seems like there should be a conditional statement that returns a comma and space plus the second address if there is a second address present, and returns nothing if the second address cell is blank. I can't find an easy way to do this. I can create a clumsy series of conditional statements like, "=CELL("type", address) followed by =IF(previous)="b", ", ", " "), and then concatenate some things together, but I can't quite get that work, either.

    To summarize, is there a straightforward conditional statement that does what I'm looking for?

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Can't Find Simple "Cell Content" Conditional Statement for Blank Cell

    Hi Bronco,

    Welcome to the forum
    You can check the second address using if(isblank(... function and then you can put comma accordingly.

    Upload the sample file if you face any challenge. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Contributor
    Join Date
    11-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    159

    Re: Can't Find Simple "Cell Content" Conditional Statement for Blank Cell

    You can use this formula..Assuming You data starts from A2, B2..

    Enter thiis formula in C2

    =IF(B2="",A2,A2&", "&B2)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1