+ Reply to Thread
Results 1 to 4 of 4

Spacing

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-13-2013
    Location
    Columbia, SC
    MS-Off Ver
    Excel 2010
    Posts
    217

    Spacing

    I have columns W:AF that need to be formatted as such:

    1) I need a space after each cell that actually contains text.
    2) I do not want a space in cells that do not contain text.
    3) I do not want a space after the last cell in a row that contains text.

    For instace:

    If I have: lets make code in cells W, X, and Y. I want cell AG (when I concatenate) to read lets make code with no space after code.
    If I have lets code in cells W and X. I want cell AG (when I concatenate) to read lets code with no space after code

    Seeing as how each row is different, is what I am asking possible?

    Ben

  2. #2
    Valued Forum Contributor Dunc3142's Avatar
    Join Date
    09-05-2007
    Location
    Franklin OH
    MS-Off Ver
    2000 and 2007 and 2010 @ Home & Teach 2010
    Posts
    351

    Re: Spacing

    If I understand, the attached might work for you.
    Attached Files Attached Files
    Yes it will. we just have to figure out how...
    If I have helped you, PLEASE click the * and add to my Rep.
    Also, if the problem is SOLVED please mark it as so.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Spacing

    Try

    =TRIM(TEXT(W1," ?;;; @")&TEXT(X1," ?;;; @")&TEXT(Y1," ?;;; @")&TEXT(Z1," ?;;; @")&TEXT(AA1," ?;;; @")&TEXT(AB1," ?;;; @")&TEXT(AC1," ?;;; @")&TEXT(AD1," ?;;; @")&TEXT(AE1," ?;;; @")&TEXT(AF1," ?;;; @"))

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Spacing

    SLIGHT CORRECTION IS REQUIRED IN Dunc3142 Formula

    =IF(W1>"",W1&" ","")&IF(X1>"",X1&" ","")&IF(Y1>"",Y1&" ","")&IF(Z1>"",Z1&" ","")&IF(AA1>"",AA1&" ","")&IF(AB1>"",AB1&" ","")&IF(AC1>"",AC1&" ","")&IF(AD1>"",AD1&" ","")&IF(AE1>"",AE1&" ","")&IF(AF1>"",AF1&" ","")
    as

    =TRIM(IF(W1>"",W1&" ","")&IF(X1>"",X1&" ","")&IF(Y1>"",Y1&" ","")&IF(Z1>"",Z1&" ","")&IF(AA1>"",AA1&" ","")&IF(AB1>"",AB1&" ","")&IF(AC1>"",AC1&" ","")&IF(AD1>"",AD1&" ","")&IF(AE1>"",AE1&" ","")&IF(AF1>"",AF1&" ",""))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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