Closed Thread
Results 1 to 3 of 3

Combine Multiple cells into Single Cells

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Combine Multiple cells into Single Cells

    Hi Guys,

    I want to combine multiple cells into a single cell using the Chr(10) operation. The cells that are to be combined are called 'data sets' - they are always 7 cells in size for columns B to H however they are between 1-3 in size for columns A. Each of these cells exist above/below each other in the same column.

    TODS = (TopOfDataSet Cell)

    Cells(TODS.Row,TODS.Column).Value = Cells(TODS.Row + 1,TODS.Column).Value & Chr(10) & Cells(TODS.Row + 2,TODS.Column).Value & Chr(10) & _
    Cells(TODS.Row + 3,TODS.Column).Value & Cells(TODS.Row + 4,TODS.Column).Value & Cells(TODS.Row + 5,TODS.Column).Value & _
    Cells(TODS.Row + 6,TODS.Column).Value & Cells(TODS.Row + 7,TODS.Column).Value

    The tricky bit to it is finding the TODS cell, as there can be multiple Datasets cascaded on top of one another

    Regards
    Attached Files Attached Files
    Last edited by jordan2322; 08-22-2012 at 10:48 PM.

  2. #2
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Combine Multiple cells into Single Cells

    please see : http://www.excelforum.com/excel-prog...iple-rows.html
    May help clear any confusion. Basically this is to do the opposite of above

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Combine Multiple cells into Single Cells

    You have already asked your question in that thread itself and you have got a solution as well. Why bump this thread then?

    I will mark this thread as duplicate and close it.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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