+ Reply to Thread
Results 1 to 8 of 8

Combining Linked Cells While Retaining Formatting

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    4

    Combining Linked Cells While Retaining Formatting

    I need some quick assistance.

    In the attached (On Sheet 1) I am trying to retain formatting of the cells being concantenated in column L. I am using linked data in cells, A, B, C, D, and E. Formatting as text is not an option. Later I will need to combin all of these contantenated rows into another concantenated space.

    I am sure there is a macro that would simplify this but at this time I have a very minimal VBA knowledge.

    The ultimate result in this instance would result in a field that would populate like this - F 5/26 5.71E, L 5/28 10.08E, L 5/29 12.17E

    This data will later be used to populate a description field that is limited to 180 Char.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Combining Linked Cells While Retaining Formatting

    Enter the following in L2 and drag it down:

    Please Login or Register  to view this content.
    Hope this helps.

    Edit:

    For the concatenation of all 3 rows, enter this in L5:

    Please Login or Register  to view this content.
    If I have helped, please click the star below.

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Combining Linked Cells While Retaining Formatting

    Perfect, now here is a question as an add-on. As you noticed, some of the cells will be blank and other times may not. How can I concatenate that data? Is there a way to essentially take the data from above that has been combined and if the field is not blank add that data and so on. I hope I am making sense.

  4. #4
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Combining Linked Cells While Retaining Formatting

    Sorry, I'm not too sure I follow you here. Are you saying that some of the fields (Date, Charge, etc.) may sometime be blank and, if so, you'd like to pull the value from the nearest populated cell above?

  5. #5
    Registered User
    Join Date
    06-27-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Combining Linked Cells While Retaining Formatting

    Let me see if I can explain it better using the same sheet from above.

    I want to see if I can concatenate everything in column "L" as long as there is a value. The way I could think of this would be to take the initial concatenated value for cell L2 and then in the next cell L3 add L3 to the end. There are 80 blank cells and sometimes there may be 10 items and sometimes 5. Since the number varies I cannot set a finite number of fields concatented. I guess this would be close to what you imagine as concatenate if not blank. At the end of the row L81 I need to return the last actual value (Not including formulas or blanks from formulas).

  6. #6
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Combining Linked Cells While Retaining Formatting

    I am by no means a VBA expert, but this seems to work:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-27-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Combining Linked Cells While Retaining Formatting

    I think I figured it out more simplistically. I set an if than, if the field in "A" was blank then I just used the same data as above but if not then I concatenated that field too. This is the formula - =(IF(A80="",M79,(CONCATENATE(M79,N80,L80))))

    I just copied this down so progressively if there was more information the field grew but if not it ignored the blank spaces.

    I greatly appreciate the help. This is a warm welcome to a new BBS for me. Hopefully I'll be here geeking out often.

  8. #8
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Combining Linked Cells While Retaining Formatting

    Glad I could help! Thanks for the positive feedback.

+ 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