# Data From Multiple Rows Into Single Column

Oct 19, 2007

I am trying to take data from multiple rows and columns (matrix) and reformat it all to fit in a single column.

It would be great if I could select the cells I want to reformat into the single column as the number of rows and columns containing the original data is not always the same (ie 20x20, 21x35, 56x200) etc...

## Copy Multiple Rows Data To Single Column

Oct 29, 2008

transposing and sorting data into multiple columns.

Column 1 for example will have the Parent's Name. Column 2 will have the Children.

If Mark has 3 children, X Y and Z

Jim has two children, A and B

then I want Column 1 to display Mark and Jims Name and column two should display all the children

Here is how I want the data:

Column1 Column 2

Mark X
Mark Y
Mark Z
Jim A
Jim B

## Single Column With Multiple Rows Of Data - Compare Names

Apr 12, 2012

I have a single column with multiple rows of data like this: Afirst last, Bfirst last, Cfirst last (all in one cell) etc.

I want to type some names in one cell in the same format (Afirst last, Cfirst last, Bfirst last) but not order and then check if any of those names exist in the first column and count the results of matches.

So in this example I am looking to count Bfirst last and/or Cfirst last in every cell of column A. I need to use a formula.

## Single Column -> Multiple Rows

Mar 5, 2014

I have a single column of about 1500 points, and I need them to be separated into many rows of 20 numbers.

I have multiple issues:

1) The middle number of each row (10th and 11th) need to be repeated. So a transpose formula can not work all the way through the 20 numbers. Unless I transpose the first ten, then tranpose the second ten. Is there an easier way around this ?

2) The bigger issue is, I would like to write a formula that can manipulate the date to enter in the correct cell.

To illustrate I will use a set of ten numbers:

1
2
3
4
5
6
7
8
9
10
11
12

INTO
1
2
3
4

5
6
7
8

9
10
11
12

## Transposing Multiple Rows To One Single Column

Apr 12, 2005

I frequently have to work with tables set up like this:

A1 A2 A3
B1 B2 B3
C1 C2 C3

All I would like to do is to transpose them into one single column:

A1
A2
A3

B1
B2
B3

C1
C2
C3

## Transposing Multiple Rows To Single Column

Feb 16, 2012

I want to transpose multiple rows to single column and I'm dealing with huge data.

For example, I am working with data like this

A1 A2 A3
B1 B2 B3
C1 C2 C3

and I have to transpose to

A1
A2
A3
B1
B2
B3
C1
C2
C3

I'm using following vb code:

Sub ToOneColumn()
Dim i As Long, k As Long, j As Integer
Application.ScreenUpdating = False
Columns(1).Insert

[Code] ........

The script terminate without completing the job and shows error as "runtime error '1004': application -defined or object defined error".

## Split Single Column Into Multiple Columns And Rows

Aug 20, 2008

I have 300 rows worth of data that looks similar to this, all organized in one column:

John Q. Smith
Programmer
2111 NW 13th St
Anywhereville, USA, 55555
(555) 555-5555
Joe P. Snider
Organizer
5645 NW 45th St
Anywhereville, USA, 55555
(555) 555-5555
Patty Williams
Accountant
6454 NW 34th St
Anywhereville, USA, 55555
(555) 555-5555

As you can see it is consistent with the name, position, address line 1, address line 2, Phone number, for every single entry. All my names are already alphabetized so I don't have to worry about it. What I want to do is have the information for each entry translated into 5 separate columns so it looks like this.

John Q. Smith Programmer 2111 NW 13th St Anywhereville, USA, 55555 (555) 555-5555
Joe P. Small Organizer 5645 NW 45th St Anywhereville, USA, 55555 (555) 555-5555
Patty Williams Accountant 6454 NW 34th St Anywhereville, USA, 55555 (555) 555-5555

Supposing I started the sheet in the top left corner at A1, I was just going to have cell B1=A1 then Cell B2=A6 then just autofill down column B but it doesn't work. I have seen some people do something similar to what I want with VBA but I am convinced there has to be something simple in with an excel formula seeing as my information is already so organized and consistent.

## Combine Data From Multiple Rows Into One Single Row?

Jun 8, 2013

I have a set of data with 5 columns. The first column is ID. Now I have the same ID recorded several times with different data (in the other 4 columns) against the ID. I want to concatenate the data with the same ID into the same row. The data has already been sorted by ID. If it is the first time this ID appears, record the whole 5 columns. If the ID appears again, then record only the 3rd, 4th and 5th column. When I run my code, I got error 'subscript out of range (Error 9)' . It seems that the array I use has only 5 columns. But I don't know how to modify this.

VB:
Sub Patient_Detail()
Dim n As Integer 'index of rows to record to
Dim i As Integer 'index of column to record from

[Code].....

## Moving Data From Multiple Rows To A Single One

Jun 29, 2014

Any macro capable of moving data from multiple row to a single one i have attach a sample file before and after ...

## Transpose Multiple Rows Of Data To Single Row?

Jul 24, 2014

I have a set of data that I need to change the "layout" of. I've had similar situations before, but this one is just killing me. Basically, my data is for item pricing. It is represented as

Item, QTY, Price
A,1,1.25
A,10,1.1
A,25,1
A,100,0.9
B,1,1.25
B,10,1.1
B,25,1
B,100,0.9
C,1,1.25
C,10,1.1
C,25,1
C,100,0.9
Item D,Qty1,P1
Item D,Q2,P2
Item D,Q3,P3
Item D,Q4,P4

However, I need it in the following format:

A,1,10,25,100,1.25,1.1,1,0.9
B,1,10,25,100,1.25,1.1,1,0.9
C,1,10,25,100,1.25,1.1,1,0.9
Item DQ1Q2Q3Q4P1P2P3P4

As a note: there is a maximum of 4 Price/QTY breaks, so the script can be hard coded for that. When I tried this, I had it looking at the Item column, finding out how many breaks there are for a specific item and then doing a loop to extract the qty and price to a single row in the format shown above. It worked for the first 2 items, but then the loop got throw off. I will see if I can reproduce the code for that.

## Consolidate Multiple Rows Of Data Into Single Row

Jul 28, 2006

I imagine my goal could be achieved via some scripting code, but, alas, I don't do vbs. Here's the situation:
I have a spreadsheet generated by another office which lists individuals' names and information about participation in various programs. Each line lists name, address, program title and amount. The next line may be the same name, address with a different program and amount. Each person may have 4-5 entries. I want to make single entries for each individual, with colums showing the programs and amounts.
Current:
1 Bob home A 25
1 Bob home B 37
2 Dave home A 22
2 Dave home B 10
2 Dave home C 21

Need:
ID Name Address Program A Program B Program C
1 Bob home 25 37 0
2 Dave home 22 10 21

Hopefully this makes it a bit more clear. The only way I know how to accomplish this is the "old fashioned" long hand approach of cut & paste. There are several thousand individuals, with (currently) tens of thousands of rows.

## Organize Data From Multiple Rows Into Single Row

Jun 12, 2007

I would like to automate, due to how long it would take to manually organize the data myself. I have all of the raw data needed organized into 3 columns. The problem is that some of the related data is divided up into multiple rows, based on ID number. What I would like to do is take the related CPT codes and respective descriptions, from the same ID number, and place them on the same row. I am going to include some pics and even a small chunk of the source data. Here is a pic of the raw data:

And here is the first 3 already done:

The number of CPT codes per ID number range from 2 - 5 I believe, maybe 6. Not sure if this has any bearing on how it is done.

## Multiple Row, Single Column Cell Blocks Into Single Row, Multiple Column Format

Mar 21, 2008

I have a text file containing internet explorer browser history. The file has data in the following format (in Excel all data is in 1 column): ...

## Retrieving Multiple Rows Of Data From One Single Item?

Jan 3, 2014

retrieve the multiple rows of data from one specific item to another worksheet inside same workbook. below attachment is my sample workbook.

inside the workbook, eg.. please have a look on Sheet 3 (the record of the item and its description) will store on Sheet 2. From sheet 1, when user choose the item from drop down list, and click the button will direct to the retrieved result in sheet 2. my question is i cant retrieve the multiple rows of data exactly in the sheet 2. it only remains one item for one row of description.

and below attached picture is what i wish to achieve =)Capture.PNG

## Data From Rows And Column To One Single Line

Nov 12, 2009

I have to worksheets: Sheet1, Sheet2. In sheet 1, I have some data like this (in first col is 1, second col is a, third col is c etc. ):

1 a b c d
2 e f g h
.
.
.
.

I need in sheet 2 in range A1(only in this range one big text), something like this: a,c,e,g ........ ( row1-col2,row1-col4,row1-col2,row1-col4 ......) ( separated by ","). The number of rows from sheet 1 is variable. The dataf a,b,c,d,e,f,g,h ... is some random text.

## Consolidate Rows Of Data Based On Single Column?

Aug 16, 2014

I have thousands and thousands of rows of data which look like the spreadsheet screen shot shown in this image:

ExcelConsolidateRaw.JPG

I want to consolidate them so that they look like the spreadsheet screen shot shown in this image:

ExcelConsolidateDesired.JPG

How to insert it into a module in the VBA editor.

## Summarize Data From Columns In Multiple Sheets To A Single Datasheet Of Rows

Jun 19, 2014

I need a macro that will take hours by day (columns) by service (rows) per client (sheet) and summarize the data into one database of rows containing client, service, date, and hours. The "Summary of Charges" should only include service hours > zero. I am attaching a sample file. I have little to no experience with vba so I don't even know where to begin. I can copy code.

## Moving Data From Multiple Columns To Single Column

Mar 28, 2012

in moving data from multiple columns to a single column. I have attached a sample image from an excel file which details the requirement. The first column contains a qualifier, that should remain constant when the data from columns B to the end move to a single column "B". The number of columns for each row is different, however, there is a maximum number, say 25. As mentioned in the image, when the data from columns B to the end is moved in to column B, column A is retained fixed, to the original value, and the original data below it is pushed below. Any pointers to how this can be achieved by VBA or without VBA?

## Move Data From Single Column To Multiple Columns

Feb 29, 2008

I saw this thread from June Cut & Paste Macro: Move Address From Column To Row and I think this what I would like to have my macro do. I have one column which is copied and pasted as text in excel and there is several blank rows.

I attached the spreadsheet example - it has 40 lenders, with the top row being the lender name (A1), followed by address(A2), city-state (A3), two blank rows(A4-A5), lender type (A6), approved date (A7), one blank row (A8), lender specialty (A9), telephone (A10) , e-mail address(A11) and two blanks rows (A12-A13) and A14 starts over again. For this example there should be 8 columns and 40 rows (lender name, address, etc...). As I mentioned I think the previous thread's macro would work with some minor tweaks. I couldn't figure out the best way to handle the blank rows and or remove the blanks and what to add or take out of the macro code.

## Convert Hourly Time Series Data From Rows To Single Column

Jan 8, 2014

I have A:1 - X365 filled with hourly energy prices for 2013. I need to convert these to a single column - A1:A8760. I have tried writing some code and some macros with no success.

If I were to do it manually 365 times, the macro would look like this:

Copy Row A1:X1
select sheet 2
Paste Special > Transpose (fills A1:A24)

repeat for rows 2-365

Tried using this from a previous post, but it takes A1:A24 then B1:B24 and so on and makes them a single column - so it doesn't work unfortunately.

Sub MakeColumn()
Dim rng As Range
Dim LastRowSrc As Long
Dim LastRowDst As Long

Set rng = Worksheets("Sheet1").Range("A1")

[Code] .....

## Moving Data Cells From Multiple Columns To Single Column

Nov 14, 2011

I'm trying to work out how to take all cells with data from multiple columns and stack them in a single column.

Here's the history...

I have multiple part numbers in single cells in column A. I perform a text-to-columns function. The resulting part numbers spread across multiple columns (say, B through K). Now I need to get all the part numbers, in their own cells, stacked in column A for one continuous list of single cell part numbers.

Is there a VBA option for cutting only the data cells from Column B-K and pasting the data at the bottom of column A while avioding blank cells?

## Excel 2010 :: How To Take Data From Multiple Columns And Add Them Onto Single Column

Mar 8, 2013

I have a long list of data with many columns and I'd like all the information to be in one column without manually copying and pasting each column and adding to the first column. The data has different amounts of rows and columns as well. An Example is below. I'm using Excel 2010. Is there a formula or something for this? This isn't the data I'm using but just an example since I do this frequently.

Data Looks like:

54654
31233
42343
51234

66968
43252
54657
63253

[code]....

Would like to look like:

54654

66968

79282

91596

68185

31233

[code]....

## Multiple Lookup Values Rows And Columns To Lookup Single Target Column On Right End?

Apr 7, 2014

I have a table of data (say Column1 to Column 5) with multiple rows.

Column 1 to 4 will have the lookup values in multiple rows and Column 5 data should be picked up using vlookup or other lookup function.

I managed to somehow bring all these lookup values in (Column 1 to 4) in a single column in another sheet. I am now trying to use some lookup or other functions to match this single column and pick column 5 data in original sheet. Result i am expecting is lookup value in first column and next to it column 5 value.

It is basically a lookup wherein lookup value is spread over multiple rows and columns and result column is fixed. I tried using vlookup, but lookup value column and column number had to change every time when i moved from column1 to 4.

## Copy Individual Data Values In One Column To Single Cell Location On Multiple Sheets?

Jan 24, 2014

I am trying to come up with the most efficient way to copy data to multiple sheets within the same Excel workbook. The original data exists within one column on a summary sheet (could have up to 500 individual entries). I want to copy each individual entry to a unique sheet (that already exists), but in the exact same cell location within each sheet. I would only want to copy the original data value and not any formatting. Is there an efficient way to do this?

In my example spreadsheet, the original data is on the SUMMARY sheet. Sheets A through J would be the target sheets, with cell B2 as the target location for each of those sheets. My example shows the result of a manual copy paste value process, but I am hoping to automate that.

## Copy Column Data From Multiple Worksheets To Single Worksheet Based On Header Criteria

Oct 18, 2013

I have a workbook with many sheets of similar but not identical data. I need to extract columns from each sheet based on 5 header criteria and paste them to a single sheet. Each worksheet contains these 5 criteria.

I've been working with the VBA script I've pasted below. It's grabbing the 5 column criteria that I have in sheet 12, and comparing them to sheet 1 in the workbook, then copying them to sheet 12. This much is good, but I need the script to also return the data from the other worksheets as well. I've tried modifying the script based on other loop functions in other scripts I've found, but I'm not having any luck.

## VBA Getting Data (5 Column To Multiple Rows)

Feb 22, 2014

figure it out thus problem with macro,

before/sample data :
name
gender
activity
code

[Code]...

after macro :

george
g
t
jas

[Code]...

it's possible with macro??

## Multiple Rows To A Single Row

Nov 28, 2009

I have a long spreadsheet, that has a format something like this: ...

## Single Row Into Multiple Rows

Dec 24, 2007

Is there a way convert single cell with wrap text into multiple cells with the number of resulting rows based on the number of lines in the original cell. Due to the restrictions of my overall printable "document", I must use multiple cells of the same height. Any change of row height would throw off the desired final result.

As an example, when I start with my original cell in text wrap and set column width I get something like the following in cell F2:

ASTM A743 UNS J93254
(SUPER AUSTENITIC)
MATERIAL)

This looks great, but it is all in one cell, and the four lines of wrapped text have obviously increased the row height which is bad.

I have tried using the LEFT and MID functions to force the text into different rows based on character length, but this is sort of messy since I am never sure what the input will be resulting in something like the following (this time in cells F2:F5) with spaces at the beginning of a line or breaks in the middle of words:

ASTM A743 UNS J93254
(SUPER AUSTENITIC)
RIAL)

My ultimate goal would be to somehow format the original input data text so that regardless of the input, the text would be restricted to a certain column width, sending the remaining text to the next consecutive rows down, and maintain the integrity of the original. I can have as many intermediate cells, formatting as I go to get to this point.

Of course, I could manually enter the text in the different rows every time, but it would be nice to have a succession of formatted cells so that the desired end result would be automatic. Hopefully, the answer does not involve too much in the way of macro or any VBA code since I am a pitiful novice, and we are sort of under pressure to get this project under way.

## Sum Multiple Or Single Rows

Feb 9, 2007

I have a cash receipt worksheet and want to sum up the days cash. My problem is some days there are one receipt and some there are five. I have to keep hitting the sum button to make it include the proper range.

## Find Multiple Numbers In One Column And Replace With Single Phrase In Another Column

Jan 31, 2013

I have taken over this spreadsheet for my work, and it is basically a statement in excel. What I want to do is find a list of invoice numbers in column B populated from a remittance, and then replace column F to say a specific thing depending on check number and date paying for that invoice. So if a check printed today I would have it replace column f to say paid 1/31/13 check # xxxxx. Currently I am searching for each invoice indivudually and then replacing with check number and date. There are about 200 invoices per month that I deal with, and it is a big waste of time!

For example from this

invoice #1 / reconciled (DATE)
invoice #2 / reconciled (DATE)

To this:

invoice #1 / paid (DATE) check # (xxxxx)
invoice #2 / paid (DATE) check # (xxxxx)