VBA Excel To Transpose Multiple Rows And Multiple Column?
Jul 3, 2013
I was planning to transpose this sample data into the output designated below.
Original sample: (There is an empty row after every 4 entries)
Name: xxx
Email: xxx
Phone Number: xxx
Address: xxx
[Code].....
View 9 Replies
ADVERTISEMENT
Feb 26, 2014
I need to transpose data from Column A to Row 2 and down.
The data in column A is in sections of 19 rows and then a blank cell and another 19 rows of data contimuously, It is a dynamic range and can contain many thousands of Rows.
The data needs to be transposed from Column A to row 2 (row 1 has the head line for each column) so the 19 lines of data is now spread accross 19 columns in row 2 and the next section from column A is spread accross the 19 columns in row 3 and so on.
My data looks similar to the below. (Test Number 0001 starts in A1)
Test Number 0001
21-Feb-2014
Kettel
Office
Demo
[code]....
I use Excel 2007
View 6 Replies
View Related
Nov 20, 2013
I have following information. I need to transpose the columns into rows
C
10001
V
1000
V
1001
V
1002
C
10002
V
1001
V
1003
C
10003
V
1001
V
1003
V
1004
The expected result should be like
10001 1000 1001 1002
10002 1001 1003
10003 1001 1003 1004
View 4 Replies
View Related
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.
View 4 Replies
View Related
Jul 21, 2013
How to selectively transpose a row of dates to columns. I'm not sure exactly how to explain this, so below is an example of what the data look like entered into the spreadsheet:
study ID
provider
visit 1
visit 2
visit 3
visit 4
visit 5
[Code]....
I'd like to extract the data into a new table on another worksheet that looks like this:
Date
provider
study id
visit #
7/21/13
Test Name
10001
[Code]...
This is just a quick example, but basically it would continue through all possible visit dates for the first study ID, then move to the next row of data (i.e. the next study ID) and extract the data from the row and transpose it in the appropriate columns moving down...
View 14 Replies
View Related
Sep 26, 2008
I am stumped on how to transpose multiple columns to rows based on specific criteria. Here is an example of the data I am working with:
Acct #Rev CodeUnitsCharges10094537034503$0.0010094537034501$605.0010094537037101$0.0010096359034503$0.0010096359034501$355.0010096359037101$0.00
I want it to look like the following:
Acct #Rev CodeUnitsChargesRev CodeUnitsChargesRev CodeUnitsCharges10094537034503$0.004501$605.007101$0.0010096359034503$0.004501$355.007101$0.00
I should note that there is oftentimes more than three rows for the same account number, sometimes it could be as many as 20 rows for the same account.
View 11 Replies
View Related
Mar 9, 2009
How to convert multiple Rows recors to a single row record in a Notes(csv) format? Have update my xls file. My source is in the below format(Source.xls):
GroupName_A,Name_A
GroupName_A,Name_B
GroupName_A,Name_C
GroupName_B,Name_D
GroupName_B,Name_E
GroupName_B,Name_F
GroupName_B,Name_G
GroupName_B,Name_H
GroupName_B,Name_I
I want to convert it to a CSV file where by it can be import to Lotus Notes (output.xls):
1,1,Group,GroupName_A,"Name_A,Name_B,Name_C","CN=John Sam/OU=FIN/OU=staff/O=IBM,CN=Mary Flow/OU=FIN/OU=staff/O=IBM",CN=John Sam/OU=FIN/OU=staff/O=IBM
1,1,Group,GroupName_B,"Name_D,Name_E,Name_F,Name_G,Name_H,Name_I","CN=John Sam/OU=FIN/OU=staff/O=IBM,CN=Mary Flow/OU=FIN/OU=staff/O=IBM",CN=John Sam/OU=FIN/OU=staff/O=IBM
As you can see only GroupNameN, and Name_N are varibles, the rest of the fields are static. note that there is opening and closing quota for column "E" and "F" in output.xls
View 5 Replies
View Related
Jul 9, 2009
I need to transpose a three column worksheet with thousands of rows containing repeats based on the value in Column A (between 2 and 11 consecutive repeats), into rows with no repeats, and the values from the repeated rows into new columns. Column A has a unique numeric value corresponding to the repeated rows. Column B has 1 of 11 values and Column C has 1 of 4 values.
The worksheet looks like this:
1 abc x
1 def y
2 ghi x
2 abc n
2 lmn x
2 def z
2 jkl y
I need to make it look like this:
1 abc x def y
2 ghi x abc n lmn x def z jkl y
I tried using the following code, but it dropped all the values from column C:
Sub kTest()
Dim a, i As Long, w(), k(), n As Long
Dim dic As Object, ws As Worksheet, s As String
Set dic = CreateObject("scripting.dictionary")
dic.comparemode = vbTextCompare
With Sheets("sheet1")
a = . Range("a2:b" & .Range("a" & Rows.Count).End(xlUp).Row)
End With
I am attaching a workbook " Book 1" that has the results from the above macro in the first worksheet "Final Report", the origninal data "orig data", and the format I need to get the data into "needed data".
View 5 Replies
View Related
Jul 10, 2012
This is a sample of the attached workbook.
Project
Task
Current Phase
Start Date
Planned Finish
Status
[Code]...
What I am trying to do is break up the "Phase" column into several columns, where each phase would have its own column. Something like this:
Phases
->
->
->
->
->
Project
Task
01.
02.
[Code]...
It is very important that the output of the data goes on a new sheet, and that the records maintain integrity.
View 3 Replies
View Related
Jul 10, 2008
I have two columns of data as follows:
10:57:42 273
10:57:42 263
10:57:42 253
10:57:42 241
10:57:37 273
10:57:37 243
10:57:37 249
10:57:37 261
10:57:37 253
11:04:47 241
11:04:47 253
11:04:47 263
10:54:31 254
10:54:31 240
10:54:31 265.......
View 9 Replies
View Related
Jul 21, 2014
I have over 200 worksheets - separate participants data. On each sheet there is a summary column of data at the moment. I now want those columns of data copied to a summary sheet but transposed to rows.
I have attached an example with 3 worksheets and the sort of summary sheet I am after.
View 6 Replies
View Related
Mar 25, 2014
1. The idea is that the macro will start on sheet1, look at column "Jon", copy the values down to the last active cell as well as the dates and paste special values and transpose them onto the "Jon" tab starting in B8 and B9. Each day all of the dates and values on the "Jon" tab should be overwritten with the data on sheets1 and 2, instead of it being cumulative.
2. The macro will then go to sheet2, look at column "Jon", copy the values to the last active as well as the dates and paste special values and transpose them onto the "Jon" tab starting in B18 and B19. Each day all of the dates and values on the "Jon" tab should be overwritten with the data on sheets1 and 2, instead of it being cumulative.
3. The macro would then save the "Jon" tab as a separate pdf in a specified location.
4. The process would then repeat for "Mike" and "Paul". Each day the number of columns can fluctuate, so it may be 3 one day (Jon, Mike, Paul) and 8 the next. The number of rows also may vary from day to day, and column to column.
I have attached a workbook that contains the data for the scenario above as well as the output (Jon, Mike, Paul tabs). Ideally there will not be new tabs that remain for Jon, Mike, Paul, just a default tab (e.g. "output" tab) that would receive the transposed data from the columns for Jon, Mike, Paul. I put all 3 in the workbook so you could see how each of them would output.
View 4 Replies
View Related
Mar 13, 2014
I want to to copy selected columns of sales data into rows organized by salesperson. I have just started out with VBA and find that I cannot do it myself.
My original data are in the form of the following:
invoice_no
product
sales
qty
total
[Code] .....
I want to display the data in another sheet in the following format:
sales_a
sales_b
sales_c
sales_d
[Code] ...........
View 2 Replies
View Related
Jun 17, 2014
I need to convert data from column IDS into separate rows, all other columns need to stay in tact. There are several distinct patterns for the IDS column, main identifiers are always starting with FILER or TEAL and the trailing numbers behind it have no more than 6 digits.
BEFORE MACRO
ID
AREA
TYPE
CLASS
QTY
IDS
1
COAL
TYPE9917312
CLASS881345
2
FILER756911**/**FILER123188 ^** FILER877119*118
[Code] ........
AFTER MACRO
ID
AREA
TYPE
CLASS
QTY
IDS
1
COAL
TYPE9917312
CLASS881345
2
FILER756911
[Code] ......
What the MACRO would look like? This is for Excel 2010.
View 3 Replies
View Related
Sep 7, 2012
how to shift data in a column down multiple rows while in an IF statement. I am assuming you cannot just simply repeat the insert cell formula.
Here is my code - it's ugly but it was working when I just needed it to move down one cell:
lastrow = Range("A2").End(xlDown).Row
For i = 2 To lastrow
Range("B" & i).Select
If Range("B" & i).Value = Range("B" & i).Offset(-1, 1).Value Then
[Code].....
View 1 Replies
View Related
Sep 29, 2011
Need to create a macro?
Delete rows where multiple column meets multiple criteria.
detail:
delete rows where
Column H is less than 10000
AND
Column C is empty(blank)
Those 2 criteria have to occur at the same time..
View 1 Replies
View Related
Jul 11, 2012
Software: Excel 2010, Windows 7
What is the VBA code for inserting text in all column B-cells of multiple selected rows?
I am creating a worksheet with a table containing various data related to orders of various materials (this is more or less data gathering from an older, paper-based 'system'). This table spans, columnwise, from A to D and expands downwards as more orders are added. The information in each column is: A=order number, B=type of material and C=material specs. and D=additional comments.
I've set it up so that the only thing I really have to do is to insert the type of material in the cells of column B, and the rest will sort itself out. Instead of having to insert a new row for each new entry and manually typing in the name of the material (these entries are often done in the midst of already existing data), I created several similar, macroed buttons for the different types of materials we use. These macros work by selecting the row of the currently active cell, inserting a new row and then add the name of the material in the column B-cell of this new row. What I am having trouble doing though, is to get the text-entry to work for a selection of multiple cells.
As an example, lets say that I would like to add 5 orders of "Grade A Steel" in the middle of the table - in the row above row 8. With the macro I currently have I can select cell B5, click the macro, and a new row will be inserted with "Grade A Steel" in column B of this new row. This action could be performed 5 times over, but would be easier if I could just mark a range of 5 cells, say B8:B12, click the macro and get the text/data inserted the column B-cells of all 5 of the new rows. So far I've been able to create a macro that inserts multiple new rows, but I've only been successful in filling the column B-cell in the first row leaving the 4 below empty.
View 8 Replies
View Related
Jul 15, 2014
I have a table in the format below with about 3500 rows
Column A
Column B
0001
All vehicles, Retirements
0002
All vehicles, Retirements, Addition
0003
All vehicles, Retirements, Addition, Deletion from Y
I would like to change it to the following format:
Column A
Column B
0001
All vehicles
0001
Retirements
0002
All vehicles
0002
Retirements
0002
Addition
0003
All vehicles
0003
Retirements
0003
Addition
0003
Deletion from Y
View 3 Replies
View Related
Jan 15, 2010
I have created a spreadsheet to show some reports and I wanted to serch for some datas which overloops themeselves. If you can have a look at a test file I attached you will see the full picture. I have 2 tables, where the 2nd one is on the right side of the 1st one. 1st table:..............
View 3 Replies
View Related
Mar 2, 2011
I have an excel spread sheet with several rows of 265 (9A-IV) columns each with a heading. I would like to transpose the worksheet columns so that the heading is placed in Column A against the corresponding that is placed in column B. For example
ABCD14692571038Transpose to A1A2A3B4B5C6C7C8D9D10
View 7 Replies
View Related
Feb 22, 2008
This is a snippit of my table1000 employees)
Benefit Emp1#Emp2#Emp3# ... ...
Earnings Pay34885.3541553.5825012.36
Health Insurance4317.0304317.03
[Code].....
View 6 Replies
View Related
Feb 22, 2008
This is a snippit of my table1000 employees) ...
View 4 Replies
View Related
Feb 23, 2012
I'm trying to do something which I can't manage with traditional formulas and a macro might be required.
I have the following table:
Code:
Header1Header2Header3Header4Header5
1.00 6.00 11.0016.0021.00
2.00 7.00 12.0017.0022.00
3.00 8.00 13.0018.0023.00
4.00 9.00 14.0019.0024.00
5.00 10.0015.0020.0025.00
What I would need to do is take all column values and transpose is to rows, copying the header for every set, like:
ColumnA ColumnB
Header1 1.00
Header2 6.00
Header3 11.00
Header4 16.00
Header5 21.00
[Code] ...
View 8 Replies
View Related
Oct 19, 2013
I am using Microsoft Office Excel 2007 and Windows 7. I have a lot of data (1-4 thousands of rows) where each column represents a year for 15 years. Every set of 5 rows are different data for a company and the values for every year of each data are under the representative column.
I want to transpose the values for every year, of one data at a time, into one column. Then do the same for the next data.
For Example I have something like this:
1998
1999
2000
2001
[Code]....
If there is a way to do this for one data (i.e. data1) it will be easy to do it for the other 4. I also know how to create a macro from the Developer Tab if it is easier to create a vba code. A formula of course is ok too. I tried for hours to find a way to do this but I couldn't...
View 9 Replies
View Related
Nov 15, 2006
I have a huge list, all in one column:
A1 1. Aarvark Inn
A2 Region: 3
A3 Unit: B
A4 2. Avalon Home
A5 Region: 6
A6 Unit: A
I want to make it so that every three items becomes a row. So that my data is like this, with the number and name being column A, the Region being column B, and the Unit being column C in the worksheet.
1. Aarvark Inn Region: 3 Unit: B
2. Avalon Home Region: 6 Unit: A
View 9 Replies
View Related
Apr 8, 2008
Transpose rows at every occurence of a value in column ...
View 9 Replies
View Related
Aug 18, 2014
I have an problem transposing multiple columns into a table. Source data is organized in 3 columns - ID, Visit#, Date. What I need is a seet in which I'd have in Column A - and ID, in Row 1 a Visit type and Visit date would be populated in the table. See attached file. Since I'm handling about 50k datapoints a simple "paste special--->transpose" is a nightmare.
View 5 Replies
View Related
Feb 12, 2014
Before
XYZ1
XYZ2
XYZ3
XYZ4
XYZ5
XYZ6
XYZ7
After
XXXXXXXYYYYYYYZZZZZZZ1234567
[Code] .....
View 10 Replies
View Related
Jun 18, 2007
I joined a file so that you guys can understand what my problem is! In test4.xls there is 4 sheets. The one named "End" should appear in a new workbook. So i'm trying to make a macro that will transform sheet A,B and C into the sheet "End" in a new workbook! i know i have to transpose the data, but i didnt find how! The problem is that the macro have to work for each month of any years(2006,2007,etc)! Anyone know how to do it?
View 14 Replies
View Related
Jan 4, 2010
I would like to ask how can I transpose this:
COMPANY1WEBSITE1FullnameAddressCity, State zip codetel numberdescriptionCOMPANY2WEBSITE2FullnameAddressCity, State zip codetel numberdescriptionCOMPANY3WEBSITE3FullnameAddressCity, State zip codetel numberdescriptionCOMPANY4WEBSITE4FullnameAddressCity, State zip codetel numberdescriptionCOMPANY5WEBSITE5FullnameAddressCity, State zip codetel numberdescription
to this:
COMPANY1WEBSITE1First NameLast NameAddressCityState zip codetel numberdescriptionCOMPANY2WEBSITE2First NameLast NameAddressCityState zip codetel numberdescriptionCOMPANY3WEBSITE3First NameLast NameAddressCityState zip codetel numberdescriptionCOMPANY4WEBSITE4First NameLast NameAddressCityState zip codetel numberdescriptionCOMPANY5WEBSITE5First NameLast NameAddressCityState zip codetel numberdescription
View 9 Replies
View Related