+ Reply to Thread
Results 1 to 4 of 4

Concatenate works, but I need to omit descriptive text when cell is empty

  1. #1
    Registered User
    Join Date
    12-15-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    18

    Concatenate works, but I need to omit descriptive text when cell is empty

    Hi all,

    I have a worksheet with elements from a journal citation in each row that I need to combine in one cell. Concatenate works beautifully for most of the data and even allows me to put the proper separators and descriptive text between the cells where needed. However, there is a column that is only populated in some (very few) of the records. This value needs to be preceded by the word suppl when it appears, but I don't want suppl to appear if the cell is empty.

    I've tried messing with substitute, trim, if and other formulas but I'm not quite getting it. Any tips?

    The worksheet is essentially:

    A B C D E F G H
    APR 2013 80 15 1378 1384
    JUL 2010 54 1 58 65
    JAN 2011 9 4 5 445 451

    I need to resulting concatenated cells to look like this:

    2013 APR; 80(15): 1378-1384
    2013 JAN; 54(1): 58-65
    2013 JUL; 9(4): suppl 5 445-451

    With the "suppl" only appearing when there is a value in the F column. Can this be done?

    THANK YOU!!!
    Last edited by michigandrea; 04-02-2014 at 08:33 AM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Concatenate works, but I need to omit descriptive text when cell is empty

    Use an IF statement for column F - something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Concatenate works, but I need to omit descriptive text when cell is empty

    Add an IF statement inside the concatenate. For example

    ...& IF(LEN(F2>0), "Suppl "&F2,"") & ...
    Make sense?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    12-15-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Concatenate works, but I need to omit descriptive text when cell is empty

    Beautiful! You all are the best! I thought there would be something elegantly simple, and sure enough! Thank you very, very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Concatenate IF cell is not empty
    By GMSuppliesltd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2013, 01:58 AM
  2. Help writing a formula to omit empty cells
    By mknispel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-16-2011, 05:58 PM
  3. Excel 2007 : Concatenate Next Non-Empty Cell in a Column
    By paulrockliffe in forum Excel General
    Replies: 15
    Last Post: 03-30-2010, 12:04 PM
  4. Need to omit parenthesis in a concatenate function
    By thunderbirdgirl in forum Excel General
    Replies: 7
    Last Post: 09-06-2007, 11:36 PM
  5. Omit the first word from a cell contain text
    By Bhupinder Rayat in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-27-2005, 01:05 PM

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