Tranpose Data Macro
Aug 15, 2006
I need write a macro that will take rows of data and put them in column form where the first column stays the same. The input to the macro is a single row. The output will vary depending on the columns in the input row. Here is a sample of the data and the needed output.
Input:
0044502232 000445022322 500445022327 600445022324 700445022321 800445022328
Output:
0044502232000445022322
0044502232500445022327
0044502232600445022324
0044502232700445022321
0044502232800445022328
View 7 Replies
ADVERTISEMENT
Apr 21, 2009
I would like to ask about How to Tranpose mulltiple contacts from one row.
Example:
Company1Firstname Lastname1 Firstname Lastname2 Firstname Lastname3Title1 Title2 Title3Company2Firstname Lastname1 Firstname Lastname2 Firstname Lastname3Title1 Title2 Title3
result need to be.
Company1Firstname1Lastname1Title1Company1Firstname2Lastname2Title2Company1Firstname3Lastname3Title3Company2Firstname1Lastname1Title1Company2Firstname2Lastname2Title2Company2Firstname3Lastname3Title3
View 9 Replies
View Related
Jul 27, 2006
i have a sheet of database which is aligned from left to right (row). now i want to "tranpose" it from up to down. how can i do it?
View 4 Replies
View Related
Jun 25, 2008
I have an extract file that is in excel and lists contract numbers with a payment amount to the right. Each contract has multiple payments by period and thus there are multiple rows for each contract representing the multiple periods. The number of periods for each contract varies. The extract file contains multiple contracts. What I would like to do is have the contract number listed in one row and copy, paste, transpose the payments to the right of the contract number. The resulting file or sheet will have only one row per contract. The issue is that the code will have to recognize when the file number changes. I know I can do this manually but with 10 files and over 450 contracts this is a bit time consuming. Attached is a sample file with two tabs titled "Extract File" and "Desired Format". Extract File - is a sample of the main file that contains the data. Desired Format - is a sample of what I would like the final result to be. It can be in another sheet or another file.
View 3 Replies
View Related
Apr 30, 2014
I am attempting to create a macro to generate emails based on data in a sheet. The goal is to run the Macro, and have it generate emails to send to contractors letting them know what they are going to be paid. For instance:
Name in Column J
Email in Column L
Memo in Column N
Balance in Column T
Due Date in Column P
Week Ending Date in Column H
Now what I would like to happen, is to tie a macro into a button that will create the email as follows:
To Field: Email address from Column L
Subject: "Company Payment Remittance Payment Date *Date from Column P*"
Body: Hello *Name from Column J*,
For *WE Date in Column H* you will be paid *Balance from Column T* for the time worked of *Memo in Column N*
Now the tricky part is that I want the email to contain all line items for each email address. So instead of sending one email per line, have the macro automatically put all of the information that needs to be sent to one email address into the message. I don't know if that is possible, but it sure would make my life easier if it was.
I have attached a sample workbook of the data that will be used
Example Workbook for Email Macro.xlsx
View 1 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
Apr 15, 2014
I'd like to have a sheet with multiple columns of data (say A thru K for instance.). Id like to reserve column A for ONLY imputing an X. The rest of the columns b-K would have data in the cells. I'd like to have a macro that when it saw an X in column A, would copy all of the data in cells B-K in that row, paste it into the next empty row of a second sheet (for history tracking), then go back to the original sheet and continue looking for additional "X"'s and repeat. Once all of the X's were copied, it would "clear" (Not delete because some of the cells would have formulas in them that would need to remain for future use.) the cells based on the "X" then finally move all of the remaining data up to the empty rows to fill in the empty rows. This last piece would be more for esthetics to have a clean looking sheet.
View 1 Replies
View Related
Mar 8, 2014
I have data in sheet 1 like below
Custid loc city
123 us newyork
124 uk wales
876 in mumbai
Sheet 2
custid newcustomerid
123 756
124 394
Outputsheet:
Custid loc city
756 us newyork
394 uk wales
876 in mumbai
So it will check sheet1 custid with sheet2 custid. If both matches it will replace custid with newcustid.if cust id not exists it will load sheet1 recprds as usual.
View 1 Replies
View Related
Mar 28, 2014
I have two worksheets. Sheet 1 has 2 columns, Column A the restaurant's name and Column B contains the review score. So sheet 1 is kinda like this:
Restaurant |Score
Ruby Tuesdays 80
TGIF 78
Outback 92
Sheet 2, Row 1 column B-E contain restraurant names (only on the top row, like field names).. i.e. I manually put the date in because typically the projected date is different from the actual review date.
-A----------- B ----------------C ------D-------- E-----
Date |Ruby Tuesdays|Olive Garden|TGIF|Ruths Chris|
I need the data from Sheet 1 Column B moved to sheet 2 in the next open row (i currently have data in row 1..the field names and down to row 35). This will be continuous so each time i need it to add the score as a new row in the correct field (restaurant name), IF the restaurant isnt listed, I want a new field named with the restaurant name and then place the score in the correct row and column. So, in the example I'd need Outback added.
View 9 Replies
View Related
Dec 6, 2006
I have one source spreadsheet, where are columns NAME, DATE. I read these data by ADO to other spreadsheet, where I can change/delete data and then run macro for update data in source spreadsheet. The problem: In source spreadsheet is column "NAME" and column "DATE", with values e.g. "Joseph"; 1.1.1980. I read this data to other spreadsheet, then I delete in it value 1.1.1980. When I run macro Update, it messages error.
Sub UpdateItem
...
.Fields.Item(1).value = activecell 'activecell value = "Joseph"
If Not isempty(activecell.offset(0,1)) Then
.Fields.Item(2).value = activecell.offset(0,1).value
Else
.Fields.Item(2).value = "" 'I tried Empty and 0 too but when I read data again then, it displays 0.1.1900, nothing works
End If
...
End Sub
It seems that in source spreadsheet has data in column "Date" format Date and when I try to update data in format String ("") in source spreadsheet by Update macro, it messages error. When I used
.Fields.Item(2).Value = Empty
' or
.Fields.Item(2).Value = 0
after rereading data it displays 0.1.1900 What I want to get is that if the cell with date (in other spreadsheet) is empty, the cell in column Date in source spreadsheet after updating will be blank (contains no values).
View 2 Replies
View Related
May 12, 2013
I am working on a project and would like to see if there is a solution for it. i have a workbook that has data entry that is summarized at a master level but I need to automatically use a formula to update another sheet after clicking an udpate button. The data from the data entry sheet needs to be allocated to all the lines that has the same master item based on the formula. A test workbook is attached ...
View 1 Replies
View Related
Oct 18, 2013
I have been working on a macro that compares a existing list of data to an updated list of data and then either moves any data not on the new list over to a completed tab (followed by deleting the record on the existing sheet), and then adds any items not on the existing sheet, but which appear on the new list, to the existing list.
I have come across a stumbling block, i have managed to identify on the existing list the rows of data that have been removed from the new list and therefore need to be moved over to the completed tab, but when i select the data it selects the header row aswell (which will always remain the same row). Obviously this then pastes the header row aswell, and also i can't seem to get it to paste in the new sheet to the next available row (i.e this will be used daily and i don't won't to overwrite the infor already in the completed tab). the next issue i have is then when i go back to existing sheet to delete the data i just copied across, as the header was initially select this also gets deleted.
The code below, is the complete code, including filtering, copying some forumals etc. The area i am getting stuck on is highlighted in red:
Sub Update()
Dim bottomrow As Long
Dim My_Range As Range
bottomrow = Cells(Rows.Count, "C").End(xlUp).Row
Set My_Range = Range("A1:Y" & bottomrow)
[Code] .....
View 6 Replies
View Related
Jan 30, 2014
I am trying to create a "Master Sheet" where I enter in the column data and after I have entered my data for each row, I can select the button which toggles the macro to run. I have it built to build new sheets as new clients are obtained. My problem is after I have a sheet that has client's data I cannot get new data to add itself below the data that is already there. I want each client's sheet to keep adding rows as more data comes in. My current macro is :
[Code] .....
Attached File : Data Entry Macro.xlsx
View 3 Replies
View Related
Jul 8, 2014
I'm creating a macro that will involve some form of if-else/case-switch, as well as a loop (probably), but I'm not too sure how to go about it.
Basically there are records in columns. Lets say Column A has numbers in it, for example
Cell A1 has "Three"
A2 has "Five"
A3 has "Two" all without quotes
I basically want a macro that will loop through the whole column, so if A1 contains "Three" (not case sensitive), then set B1 to "3" without quotes. If A2 contains "Two", then the macro will set B2 to "2" without quotes.
Of course this is sample data but you get the jist. It needs to loop through one column, so as to fill in the other column. You can assume that column A will always be filled, so the macro is being created to automatically fill in column B based on what is in column A.
View 1 Replies
View Related
Jul 21, 2014
I need to take data from spreadsheet Control Master.xlsx then apply calculations from another one Calculations.xlsx and record results to the first spreadsheet.Data to be taken from Control Master.xls columns C, D, E. After calculations results (Calculations.xls columns Q, R, S) to be recorded back to Control Master.xls columns F, G, H.
View 4 Replies
View Related
Dec 24, 2009
What i want to do is clear some data within a merged cell but leave the rest.
I have added a sample workbook. The data i want to clear is highlighted in Red so the 11111 will be replaced with ...... and the 09/12/09 will also be replaced with .......
View 7 Replies
View Related
May 28, 2012
I'm trying to rearrange vertically aligned data so that they are horizontal. But at the same time, I need this macro at an interval.
To give you an example,
Mr. Yang Xin 221-421-5123 Male College Grad
Ms. Taylor Cindy 534-123-5512 Female Uni Grad
In this case, we need the data to be arranged this way.
Mr. Yang Xin 221-421-5123 Male College Grad Ms. Taylor Cindy 534-123-5512 Female Uni Grad
Could you write me a macro?
View 5 Replies
View Related
Jan 21, 2013
I have a worksheet which contains certain sections. I want to create a macro which will run if data is input into those sections. This macro should copy whatever was entered into another worksheet automatically as data is being entered. Is there a way for that?
View 8 Replies
View Related
Jan 3, 2008
I'm trying to move data from a primitive user form to another sheet acting as a DB. I will further pivot the data in a third sheet to boil up results.
Here is the primitive user form - or desired data from the user form: ...
View 9 Replies
View Related
Nov 19, 2008
I have built a macro, but want the sheet to select all the rows until you meet a empty row then stop pooling etc..
See below, i am just selecting the rows when I recorded the macro. I want to tell the Macro, pool all the rows starting from row 7 going down until you meet a empty row.
What should I do to tell the macro stop pooling once you meet a empty row?
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 11/17/2008 by DHL User
'
'
Sheets("Air Freight Rates").Select
ActiveWindow.ScrollRow = 952
' Removed additional scrolling
Rows("7:2001").Select
View 9 Replies
View Related
Nov 30, 2009
need to create a macro that inserts 3 rows below each existing row of data and simply copies and pastes that data into each of the empty rows before moving on to the next unique row and doing the same thing again.
This is what I have so far, but I can't seem to get the loop right.
Rows("2:2").Select
Do
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
activecell.Offset(-1, 0).Select
Range(activecell, activecell.Offset(0, 5)).Copy
activecell.Offset(1, 0).PasteSpecial
activecell.Offset(1, 0).PasteSpecial
activecell.Offset(1, 0).PasteSpecial
Selection.Offset(1, 0).EntireRow.Select
Loop
View 5 Replies
View Related
Jul 16, 2014
so to start off im not able to attach things due to security reasons, what i need is either 1 of 2 macros. if its possible, both are related. one possible is as follows: i need it to go through a certain column (say I for example) and look at the information in it, this information can vary from peoples names along with dates and other stuff, i want it to look through these and if anything has a date today and prior i need the cell to be highlighted. problem is sometimes it might have 2 dates, or no dates. it should have todays date, their name, other information, and future date of something. but not everyone does, this is the macro i dont think that can exists.
2nd macro possibility the other macro uses the first sheet, AFTER been highlighted, normally by hand, and takes it to another workbook and puts in in certain spots. so the first sheet has names of everyone in column K. what i need is it to look at column I and if its highlighted take entire row to other book, and put into sheet under the person name in their tab. the second book has a tab for each person (at this time 18 tabs) which can fluxuate, and each tab is the persons first and last name, without spaces. since when i put sums on main page it didnt want to work with the spaces i had to omit them. again im not sure this is possible.
View 6 Replies
View Related
Jul 15, 2014
I wondering if it is possible for a macro to recognise whether or not there is text in an adjacent cell, and if there is, then to copy data from another adjacent cell.
For example, because there is data in C2, data from A2 has been inputted into B2. And any blank cells are left alone.
a
b
c
d
e
ref1
(cell A2 data here)
DATA
DATA
DATA
ref1
View 5 Replies
View Related
Sep 25, 2012
i am looking for a macro that adds a new row of data. For example i have these rows below, where orange is input and white is derived from a formula. So ideally the macro would be assigned to a button which when clicked would have fields for the 8 orange cells and then automatically copy down the formula of the 2 white cells.
Staff
Gender
DOB
[Code]....
View 8 Replies
View Related
Nov 20, 2008
I have the following macro which copies data from one spreadsheet to another spreadsheet. The 2 files are specifically named in the database so they must have those specific file names in order for the macro to work.
Is there a way to set up this macro so that it automatically copies the data in the file that is active at the time (File1 in the attached code) to File2? File2 will always be the same file name, so that part of the macro is fine as it is. The active spreadsheet will always be the same format (so the Source Cells will work) but it may have a different file name each time.
View 2 Replies
View Related
Dec 8, 2008
I have a workbook with four sheet. in Sheet1, column A, there are about 80 entries. I wish to copy these 80 entries to another Sheet, say sheet 2 in Column C.
View 3 Replies
View Related
Jun 28, 2009
I have an excel spreadsheet set up as shown in the attachment. When I insert data by using the macro (Insert farm), for some reason it puts a NA in a cell (C17).
I then select the cell click into the formula and click enter and it works. how can this be fixed. Look at the excel spreadsheet to be able to understand.
View 2 Replies
View Related
Apr 24, 2014
I'm working on spreadsheet to track my sales on Amazon.com. In doing so, I need to create a single worksheet (called "Ship Master")that lists every sale I've ever made. I am able to generate reports on Amazon's website which lists all of my sales for a given period (up to 30 days maximum), which can then be copy/pasted into my workbook.
In theory, if I was very vigilant in selecting the dates I chose to download, I could simply copy/paste the data right into the end of the "Ship Master" worksheet, but mistakes could lead to redundancies and errors in my data.
What I'm looking to do is to download a report from Amazon, and after deleting any old data from the "Ship Import" sheet, pasting the fresh data into it.
From there, I'd want the macro to look at the newly pasted data in the "Ship Import" sheet, and copy any new sales into the "Ship Master" worksheet. Both worksheets have identical headings. There is a unique identifier in column D of these work sheets called "shipment-item-id". This identifier is what the macro is going to be checking for when it determines whether or not the data should be appended to the "ship master" worksheet.
I've attached a sample workbook with the 2 worksheets and some data in them.
View 4 Replies
View Related
May 13, 2014
I need to alter this piece of code so that it extrapolates the data in the same row as the keyword and not from the column. The keyword i'm using is "N" and is found in the first column.
[Code] .....
I have also attached a copy of the workbook : 120514 KCS CLEANING MAY DATA CALLED.xlsx
View 5 Replies
View Related
May 27, 2014
I am trying to create a macro which copies the data of one column every time I click on it. However, every time I click on it I overwrite the data I already copied. What do I have to do, that instead of overwriting my data it copies it to the next free column.
See example attached. Macro example.xlsx
View 2 Replies
View Related