+ Reply to Thread
Results 1 to 7 of 7

Concatenate cells, If length is greater then X, Concatenate different cells

  1. #1
    Registered User
    Join Date
    08-15-2017
    Location
    Wyoming, USA
    MS-Off Ver
    2013
    Posts
    18

    Concatenate cells, If length is greater then X, Concatenate different cells

    Hello,
    My goal is to concatenate two cells, if the length of the concatenated values is greater then 30 characters then concatenate a different set of cells. Here was my attempt, but i'm running into issues.

    =IF(LEN(A2>30,(CONCATENATE(B2, " ",E2)),(CONCATENATE(B2, " ",F2))

    Is this possible to do without running into circular reference?

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    =B2 & " " & IF(LEN(A2) > 30, E2, F2)

    It can't go in any of those four cells.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    Quote Originally Posted by CB5 View Post
    concatenate two cells, if the length of the concatenated values is greater then 30 characters then concatenate a different set of cells.
    With the first set of cells being A1 and B1 and the second set of cells being C1 and D1, try this:

    =IF(LEN(A1&" "&B1)>30,C1&" "&D1,A1&" "&B1)

    If this is not what you were looking for, please upload a sample workbook with some examples for us to go off of.
    Last edited by 63falcondude; 08-15-2017 at 03:29 PM. Reason: Typo

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    You're missing an ampersand, fd, but I expect that's a better interpretation.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    Good catch shg. Fixed.

  6. #6
    Registered User
    Join Date
    08-15-2017
    Location
    Wyoming, USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    Thanks shg and falcondude this provided what I needed.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Concatenate cells, If length is greater then X, Concatenate different cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Excel macro to concatenate cells without blank cells
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2016, 01:50 PM
  2. [SOLVED] Concatenate multiple cells based on separate identical cells
    By Lolpan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-27-2016, 11:36 PM
  3. [SOLVED] How to concatenate text cells but skip blank cells
    By jontherev in forum Excel General
    Replies: 5
    Last Post: 03-26-2014, 05:38 PM
  4. [SOLVED] Concatenate including blank cells and cells with more than one word
    By Shadefalcon in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-26-2012, 05:12 PM
  5. Concatenate cells with delimiter, new row for values after blank cells
    By testerss in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-28-2011, 04:26 PM
  6. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  7. Replies: 0
    Last Post: 04-07-2009, 04:42 PM

Tags for this Thread

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