Vba For Rearranging The Data

Aug 28, 2009

I want to rearranging the data in year wise for each company. My data (Sheet 1) is in this order.

Year Company A Company B

1996 Data 1 Data 1
.......
2006 Data 11 Data 2

I wan to rearrange the data (Sheet 2) in to the following order.

Company A 1996 Data 1
........
2006 Data 11

Company B 1996 Data 1
.........
2006 Data 11

Is there any possibility for vba for this soloution. If i will increase the no of companies, whether the vba will work or not.

I have attached a file for the same

View 10 Replies


ADVERTISEMENT

Rearranging Data From One Sheet To Another

Oct 31, 2012

I have about 20 columns headed things like Product Number, Size, Colour, Weight etc

So for example, one record might be something like:

Product number
Size
Colour
Weight
Col5
Col6
Col7
Col8
etc

[Code]....

I have about 10,000 of these records.

What I need is to rearrange them in another sheet which just has 3 columns.

Product number
Attributes
Values
A record would look something like
Product number
Attributes
Values

[Code]....

Is it possible to transform the first format in the first spread sheet to the second format in the second sheet?

View 14 Replies View Related

Rearranging All Data To Three Columns

Sep 19, 2006

I have a worksheet that contains data in the first three columns and then the 4th column is empty and then there's data in the next three columns and then an empty column etc. How can I cut the data from columns E to G and I to K and M to O etc....and paste it directly below the data in columns A to C? I dont know how many columns of data there are in the worksheet and every set of 3 columns of data (eg. E to G) varies in size. I recorded the following macro of what I want to do.

Sub rearrange()
Range("E1:G1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("A95").Select
ActiveSheet.Paste
Range("I1:K1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("A203").Select
ActiveSheet.Paste
Range("M1:O1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("A386").Select
ActiveSheet.Paste
End Sub

View 2 Replies View Related

Rearranging Data In Table Without Calculating Anything?

Jan 6, 2014

I have a csv file that includes several runs of a test per day on 5 different parameters. I need to rearrange this data to show the results from each run on each date, but arranged in a different way. I've attached an .xlsx file that best describes what I have

View 8 Replies View Related

Macro For Rearranging Data Table?

Nov 28, 2011

I have a data table which looks like this:

1 2 3 4 a b c
5 6 7 8 d e f

And it should be converted to look like this:

1 2 3 4 a
1 2 3 4 b
1 2 3 4 c
5 6 7 8 d
5 6 7 8 e
5 6 7 8 f

So basically, the data in the last columns should be transposed, and the data in the first columns need to be copied in the cells of the new rows.

View 1 Replies View Related

Rearranging Data From One Column To Multiple?

Apr 25, 2012

unable to find anything besides splitting numbers and letters in a column into multiple columns.

The raw data at the moment looks like this:
ID Number
Ticket Number
Event

Sheet1 *A158662TIC-00013Food4flags512346TIC-00027flags8picnic9555510TIC-000311Food12picnic139707414TIC-000415Food16picnic17784218TIC-000519Everything
I would like to somehow change that into this:

Sheet1 *ABCDE15866TIC-0001Foodflags*21234TIC-0002*flagspicnic35555TIC-0003Food*picnic497074TIC-0004Foodpicnic*57842TIC-0005Foodflagspicnic

View 3 Replies View Related

Rearranging List Of Data In One Column

Oct 18, 2012

How do I rearrange a list of data in one column that are in sequence to appear at random i.e data should not follow any particular pattern.

View 4 Replies View Related

Rearranging Data From Combined List To Separate Lists?

Aug 21, 2014

Is there a simple way via VBA to alter the layout of data from a mixed up two column list into multiple headed lists on another worksheet (within the same workbook)?

The attachment should better demonstrate what I mean. Sheet1 has example data of how it is and Sheet2 shows how I would like it.

The data will be dynamic in the sense the numbers of unique values in column A will change (only increase, never decrease), as will the number of unique values in column B.

View 2 Replies View Related

Rearranging Data In Form Of Panel Data?

Apr 18, 2014

Is there any way to rearrange data in this way for the following:

: BEFORE:
/////////[Ticker A] [Ticker B] [Ticker C]
2010 ///// 0,3 ////// 0,6 /////// 0,9
2011 ///// 0,7 ////// 1,4 /////// 2,1
2012 ///// 1,3 ////// 2,6 /////// 3,9

: LATER :

2010 Ticker A 0,3
2011 Ticker A 0,6
2012 Ticker A 0,9
2010 Ticker B 0,7
2011 Ticker B 1,4
2012 Ticker B 2,1
2010 Ticker C 1,3
2011 Ticker C 2,6
2012 Ticker C 3,9

Worth function, worth macro, what worth everything that's automate this process. Are spreadsheets with hundreds of rows.

View 3 Replies View Related

Combining And Rearranging Data Records From Multiple Worksheets To A Single Worksheet

Sep 13, 2009

I have a set of related variables that are split over multiple worksheets, and I need to be able to take specific information, duplicate certain values and produce an output sheet for use in a separate piece of software.

The variables are:
Position Number (Sheet 1)
Position Title (Sheets 1 and 2)
Position Requirement (Sheet 2)
Requirement Importance (Sheet 2)

The output sheet requires a list of all the requirements for each position number, which means the position number itself needs duplicating (in new rows) X number of times, where X is the number of requirements assigned. The appropriate requirements are then to be pasted in next to each position number (and the requirements can be found by comparing position number to title, and from title to requirements).

Normally, I’d be able to do this using lookups and so forth, but my problem arises when I have multiple position numbers with the same related title (in the attached example, there are three plumbers with unique position numbers). I can’t figure out how to say to Excel “a plumber has five requirements, and there are three plumbers, so duplicate each position number for each plumber five times, then insert the appropriate qualifications (and their associated importance values) next to the position numbers”.

View 4 Replies View Related

Convert The Data Shown In Table 1 To Table 2 Without Rearranging The Columns And Rows

Sep 11, 2009

Is there a function to convert the data shown in table 1 to table 2 without rearranging the columns and rows? because i don't want to use TRANSPOSE. I want a function, somthing like SUMIF with OFFSET or INDEX and MATCH or any other function.

Table 1

Team 1Team 2Team 3Team 4Team 4Team 5Team 5ABABCity 12531642City 231173705City 367891125City 436251348

Table 2

City 4City 2City 1City 3Team 4BTeam 2Team 5ATeam 4ATeam 1Team 3Team 5B

View 2 Replies View Related

Rearranging Names....

Feb 11, 2010

I have a list of names in the format "SURNAME, Firstname". By using left find and mid find formulas and then concatonating the result I can put the first name first and the surname after it in proper case. This works well for the most part (although if there is an easier way I'd be happy to hear it!) except for when it comes to people with double unhyphonated surnames - lets say for example Ella Van Hamburg.

The name would come through in the raw data as VAN HAMBURG, Ella When I separate the surname and change the case it says Van Hamburg But when I go to extract the first name I get the result HAMBURG, Ella And so when I concatonate: HAMBURG, Ella Van Hamburg. It works perfectly for everyone else, and with hyphonated surnames. I am then using this data in a VLOOKUP which means that the final result has to be in the leftmost column so at the moment that's just where I'm concatonating it.

View 4 Replies View Related

Rearranging Cell Contents

Aug 28, 2009

I'm trying to work out if there is a way to rearrange the contents of a cell. Basically, I have names in each cell which have surname then first name and I want to have them reversed.

I know it would be easy if they were in seperate cells but unfortunately that's not the case. Is there a way to do it? If it's any help surnames are in upper case and first name in proper case.

View 11 Replies View Related

Rearranging Values In Table

Jun 25, 2009

I have table with duplicates values on the left side. Table has three columns and in each row is value only in one column. It looks like this:

EVI ROZ POA
101 22
101 3
110 6
110 2
110 3
112 12
114 8
114 6
...

I need to get rid of the duplicates in first column and save values for same number in first column in one row. Like this:

EVI ROZ POA
101 22 3
110 6 3 2
112 12
114 8 6
...

I think only macro can do this.

View 14 Replies View Related

Rearranging Columns With Intervals

Aug 16, 2009

I have posted earlier thread on similar problem but i did not get much response.I am really having a tough time to record a macro, where my columns will be selected with an interval and then will be pasted in to another sheet....

View 6 Replies View Related

Rearranging An Exported File

Oct 12, 2007

I imported a file of National Historic sights which imported fine with the exception that it's all out of order. Here is how it currently looks:

ResnameFIELDFIELDVALUE
Lake Norconian ClubApplicable CriterionARCHITECTURE/ENGINEERING
Lake Norconian ClubApplicable CriterionEVENT
Lake Norconian ClubArchitectGibbs, Dwight
Lake Norconian ClubArchitectWilson, G. Stanley
Lake Norconian ClubArchitectural StyleMISSION/SPANISH REVIVAL
Lake Norconian ClubArea of SignificanceARCHITECTURE
Lake Norconian ClubArea of SignificanceEXPLORATION/SETTLEMENT
Lake Norconian ClubCurrent FunctionDEFENSE
Lake Norconian ClubCurrent FunctionGOVERNMENT
Lake Norconian ClubCurrent SubfunctionCORRECTIONAL FACILITY
Lake Norconian ClubCurrent SubfunctionNAVAL FACILITY
Lake Norconian ClubFederal AgencyDEPARTMENT OF THE NAVY
Lake Norconian ClubHistoric FunctionCOMMERCE/TRADE
Lake Norconian ClubHistoric FunctionDOMESTIC..........................

View 9 Replies View Related

Linking Cells For Rearranging

Jul 14, 2006

how to link cells such as one cell with a date and an adjacent cell with data so that while I am rearranging the data in various ways the date that corresponds with the data stays with it as it moves around while I am sorting the data.

View 2 Replies View Related

Rearranging Exported SharePoint Lists In Excel?

Jul 1, 2013

I've just exported a list from SharePoint to Excel, which gave me as a result a owssvr table, so far so good cause every time the list in SP is updated I can do a refresh and get the latest values; however once I opened the table I realized that the columns where not correctly order they were all mixed and the information does not look as it is required so I need to rearrange them. I do not need to delete a column I just need to be able to move them between themselves so that they will follow certain order: Product ID, Name, Amount of pieces, Place where they are stored, etc. this is very important because later on I use "vlookups" to do a series of reports.

I've tried cut- paste to move the columns to the correct position, unfortunately once I close the excel file and try to open it again, I got a message saying that the content is not readable and when Excel repairs it, my owssvr table loses the link to SP so I cannot update refresh the table anymore.

I cannot edit the list in SP as this site does not belong to me and I only got access to export the data and be able to refresh the table, all I want is to be able to move them within my ovssvr table so that locally I can work with them better.

Here is a pic of what I am talking about: cmms.JPG

So for example in the pic I put, I need that instead of Comments in Column E, Product ID can be in Column E, then Name in column F and so on..

View 1 Replies View Related

Excel 2007 :: Rearranging Numbers In Another Column

Apr 22, 2012

Formula that can do this?

Sheet1
ABC111213214325436547658769871018112123113421453156416151726183194120522163227423852496257268279
Excel 2007

I basically want column A to be like Column C. The logic is that every time the row that have 1, skip a row and run the numbers until the next 1 appears.

View 3 Replies View Related

Rearranging Order Of Text String Inside A Cell

Apr 9, 2009

rearragning text on excel. I believe Macro will be needed to solve this problem so if anyone can help me out, it will be a big help. Thank you.

Example 1:
I need to rearrange
"trace Silt, cm SAND, some- f Gravel" into
"cm SAND, some- f Gravel, trace Silt"

Example 2:
I need to rearrange
"some+ Silt, f SAND, trace- f Gravel" into
"f SAND, some+ Silt, trace- f Gravel"

There are many different cases for this problem. So if there is a way for the computer to recognize the Capitalized word and move it to the front and rest should be arange in order listed below.

Order
and+
and
and-
some+
some
some-
little+
little
little-
trace+
trace
trace-

each term is seprarated by commas.
For example
f SAND, some+ Silt, trace- f Gravel
each color represent one complete sentence. and the order for them should be capitalized funciton first, then the follow the order provided above.

View 11 Replies View Related

Add Data Monthly And Then Have To Manually Update The "source Data" To Reflect The Added Data On Chart

Apr 28, 2009

I have a column line chart to which I add data monthly and then have to manually update the "source data" to reflect the added data on chart. This is a rolling graph, which mean that I have to remove data for one month(from last year) and then include the new month's data. Is there any way on automating this process...like a macro or something, so once I add the data excel automatically removes one month of old data and make changes to include fresh data. Eg Currently chart is based on data from A2:F2 and I add new data to cell G2. I need something which automatically update the source data to cell B2:G2.

View 4 Replies View Related

Update Data By Ado - Change/delete Data And Then Run Macro For Update Data In Source Spreadsheet

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

Create Userform That Adds Integer Data To Existing Data In Specific Cells

Jan 29, 2013

I am trying to create a user form that will allow the user to type int values in boxes. Then when the user clicks the submit button the code needs to add the values from each user input box to the existing values in specific cells accross multiple worksheets. Then the form needs to be cleared after the cell values are updated. I can create the form it is the code on the submit button i am lost on. Also it is important that some boxes may be left blank.

If you click the Grey "Qty Form" button on sheet1 the form will open. User data numbers can be entered in the blank boxes. When the submit button is pressed the form needs to add the user entered numbers to the numbers in the corresponding cells in sheet 1 and sheet 2. How to code the submit button to do this properly. Also after the data on the spreadsheet is updated the form needs to be cleared and start the cursor back in the Item 1 box on the form.

View 1 Replies View Related

Formula / Function To Collect Data From Multiple Sheets And Store Data In One Sheet?

Dec 17, 2013

- I have total of 13 sheets in a workbook - 12 sheets represent 12 months with data; 13th sheet is single sheet in which i would like to get complete overview of 12 months

- each of 12 sheets has actually sales results for multiple products with following data: internal code, manufacturer part number, name, and qty sold in that month

- situation is that some products have been phased out during the year and some were introduced so each sheet is slightly different in terms of in which row certain product is located

What i would like to achive is to make 13th sheet (whole year overview) do the following:
- there is a list of all the products in it, each product has unique internal code - this code (from each line) should be used to find that code in each monthly sheet, then find its monthly sales value (copy it) and paste it in sheet 13 in cell that represents this product and particular month.

In other words i would like to see for each product what was monthly sales throughout this year, but avoid manually filling in qty for each product per month.

View 2 Replies View Related

Formula To Separate Specific Data From Data List In Sheet1 Into Sheet2 / Sheet3

Jun 30, 2014

I have attached a sheet that has part of a data list, sheet called (Full Data) what i am trying to do is seperate the data into event locations into individual sheets.

The data ref will be column F which is the different event locations.

I thought the best way to try and do this was to create an if/ match formula using the sheet tab names as the if match, with the event locations in column F.

I have added two sheet tabs so you can see that i require the data for (Ain) to be put into the Ain sheet.

The data list in Full Data sheet will be continuously updated so i will need the range to be around 10,000 entries.

View 5 Replies View Related

Macro To Generate Outlook Emails With Data / Information From Multiple Rows Of Data?

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

Pull Data From Sheet Based On Criteria - Populate UserForm And Ask For Missing Data

Feb 8, 2014

I have a spreadsheet that is updated weekly -- but every week new info is added that needs a user to input corresponding info. I use a vlookup function to link to another spreadsheet that populates the info from previous weeks and the info that is missing shows up as #N/A...

First I was using a msgbox function to get the info:

HTML Code: 

For Each b In myrange
If Application.IsNA(b.Value) Then
Employee = b.Offset(0, -2).Value
SSID = InputBox("Please enter ID# for " & Employee & " :", "New Employee Found")
b.Value = SSID
End If
Next b

But it can be up to 30 different new employees... and that is time consuming.

I would like to make it more user friendly by creating ONE userform that displays all of the employees as labels -- has a text box in which to put the ID # -- and then has a drop down box to choose the type of employee (2 options). I want all of that info to go back to the reference spreadsheet so it will be saved for following weeks, and then redo the vlookup to get the info into the new weekly spreadsheet (I can do that part)....

HTML Code: 

Private Sub CloseButton_Click()
Unload UserForm1
End Sub

Private Sub ComboBox1_Change()

[Code] ......

View 2 Replies View Related

Create Line Graph That Will Incorporate Multiple Columns Of Data In One Series Of Data

Sep 27, 2011

I am trying to create a line graph that will incorporate multiple columns of data in one series of data. The reason I do not place all of the data in one column is because it could exceed the maximum amount of rows allowed in excel. Also I need the data split up for viewing purposes.

I can easily just graph one column but how do I combine all the columns into one line graph with the data being in separate columns. Basically all the columns will be my Y values and X values are just 1:n.

Example Below:

Column AColumn B Column C159261037114812

Now in the example all of the values are x values.

View 2 Replies View Related

Copy / Paste Frequently Changing Data From 4 Sheets Into One Master Data Sheet

Jul 4, 2012

I have a workbook that includes 4 seperate sheets that are used to record time and expenses for 4 members of staff. I want to write a macro to select the data I need from each sheet and colaberate together in a 'data' sheet so I can combine all the info to run time and expense reports per client showing combination of all time and expense incurred from all 4 staff.

I have named cell ranges in each of the 4 time-sheets. I proceed to record a macro, select the first named range, copy and paste into my data sheet, do a control home then control down arrow, then one more down arrow to get to the first blank cell and repeat the process for all four time-sheets.

This works until I add a new line and then the data will only appear for the last time-sheet (last row of data).

View 2 Replies View Related

Excel 2010 :: Access Data Connection Query - Missing Data All Of Sudden

Oct 19, 2012

I created a slick little excel sheet with the data coming in automatically via Access query. It has been working fine for months. Now all of the sudden there are a bunch of cells with missing data. The weird part is it's not as if whole columns are missing data, more like 90% missing. When I go to Access and run the query all cells are populated as the should be. There have been no changes to the query at all during this time.

btw...I am running Office 2010

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved