+ Reply to Thread
Results 1 to 10 of 10

Combining data organised in rows with varying number of columns into a data set of one col

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Combining data organised in rows with varying number of columns into a data set of one col

    I am trying to combine data orgainsed for example as

    A1 - Vidhur
    B1 - Mehra
    A2 - James
    B2 - Arthur
    C2 - Brown

    Into one column so it shows

    A1 - Vidhur
    A2 - Mehra
    B1 - James
    B2 - Arther
    B3 - Brown

    The actual order within the column doesn't matter I just need all the individual cells to be in a single list
    I have a table of e-mail addresses. Some rows have one e-mail address, some have several

    But to import into a marketing application for a mail out it needs to be in one column

    Any help greatly appreciated

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Hi,

    Not sure I understand. Your desired results comprise two columns, not one?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    12-10-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Sorry, the final output I am looking for should be in 1 column eg in the format

    A1 - Vidhur
    A2 - Mehra
    A3 - James
    A4 - Arther
    A5 - Brown

    Thanks
    Vidhur

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Assuming your original data is enclosed by the range A1:G10, enter this array** formula in e.g. H1 and copy down until you start to get blanks for the results:

    =IFERROR(INDEX(INDEX($A$1:$G$10,,MATCH(TRUE,MMULT((--(TRANSPOSE(COLUMN($A$1:$G$10))>=COLUMN($A$1:$G$10))),SUBTOTAL(3,OFFSET($A$1:$A$10,,ROW(INDIRECT("1:"&COLUMNS($A$1:$G$10)))-1,,)))>=ROWS($1:1),0)),SMALL(IF((1-(INDEX($A$1:$G$10,,MATCH(TRUE,MMULT((--(TRANSPOSE(COLUMN($A$1:$G$10))>=COLUMN($A$1:$G$10))),SUBTOTAL(3,OFFSET($A$1:$A$10,,ROW(INDIRECT("1:"&COLUMNS($A$1:$G$10)))-1,,)))>=ROWS($1:1),0))="")),ROW($A$1:$A$10)-MIN(ROW($A$1:$A$10))+1),IFERROR(1+ROWS($1:1)-LOOKUP(ROWS($1:1),1+MMULT((--(TRANSPOSE(COLUMN($A$1:$G$10))>=COLUMN($A$1:$G$10))),SUBTOTAL(3,OFFSET($A$1:$A$10,,ROW(INDIRECT("1:"&COLUMNS($A$1:$G$10)))-1,,)))),ROWS($1:1)))),"")

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  5. #5
    Registered User
    Join Date
    05-27-2014
    Posts
    11

    Re: Combining data organised in rows with varying number of columns into a data set of one

    This is fantastic
    Thank you so much

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Combining data organised in rows with varying number of columns into a data set of one

    You're welcome!

    That formula is quite old so I imagine it could be improved upon now!

    Why have you changed your Username, by the way? Have you informed a moderator that you have two accounts (if that is the case)?

    Regards

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Of course it is a fantatic formula of XOR LX in #4.

    But with only 2 columns, why not just cut / paste column B below the last value in column A?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Quote Originally Posted by oeldere View Post
    Of course it is a fantatic formula of XOR LX in #4.

    But with only 2 columns, why not just cut / paste column B below the last value in column A?
    ..............

  9. #9
    Registered User
    Join Date
    05-27-2014
    Posts
    11

    Re: Combining data organised in rows with varying number of columns into a data set of one

    I actually have multiple columns in the data set so that is when this formula / array helps

    I couldn't remember my password and couldn't find the password reminder so I set up a new account
    I will inform a moderator

    Thanks again

  10. #10
    Registered User
    Join Date
    05-27-2014
    Posts
    11

    Re: Combining data organised in rows with varying number of columns into a data set of one

    Just to explain in a little more detail

    I have a csv file with a number of e-mail addresses that are comma separated
    I use the text to columns feature to split them out

    Some rows have one email some have 5 or 6

    In order to use the date for a mail out I need to put into 1 column which this array does quite nicely

+ 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. How do I create a chart that shows a varying number of rows of data?
    By alexander.small in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2013, 04:29 AM
  2. Combining Duplicate Columns with the different data in their rows
    By cleefred in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-21-2013, 10:42 AM
  3. Replies: 8
    Last Post: 10-10-2012, 10:40 AM
  4. Combining Data of varying lengths
    By jaj8372 in forum Excel General
    Replies: 14
    Last Post: 06-08-2010, 03:47 PM
  5. Combining data columns - Excel changes number
    By nefar in forum Excel General
    Replies: 6
    Last Post: 02-07-2008, 11:43 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