Rearrange Data In Hierarchy To Table

Jun 6, 2007

How do I use VBA to rearrange the data from the hierarchy format of Table 1 into the flat format of Table 2. See attached file >Data_Belinda_June-5-07.xls

Table 1: Each record has information arranged in a hierarchy format.
Level 1 information is indented by one space on one line; Level 2 information is indented by 2 spaces on the next line, etc.

Table 2: Data from Table 1 have been rearranged into 7 columns. Another column has been added to create a field for the Reference ID.

Reference ID: Two types: i) Created by prefixing with the letters BI , adding the first four letters from column 4 and the first four letters from column 5; ii) As in (i) with the addition of the entire word from column 6.

The report I have may have more than one hundred records and there may be more than ten people within each section.

View 9 Replies


ADVERTISEMENT

How To Rearrange Raw Data Into New Table

Oct 15, 2013

I have a raw data sheet from the CTI in my workplace (sheet 1 in the attached file), the problem with the data is that i can't seem to be able to sort it in a table like i want (like the one in sheet 2 in the file) because of the inconsistency of the data location,i was thinking that there must be some formula (offset?) or macro code that can arrange the data from sheet 1 into the table in sheet 2.

m.xls

View 2 Replies View Related

Rearrange Columns In Particular Manner In A Table

May 9, 2014

I create a report where in I need to rearrange the columns in a particular manner as required by the client. Any macro which will will work as per following criteria.

Column headers start from A1 onwards (the last column header might vary depending on the creator, I get the report from a different team). The number of rows of data might vary.

For changing the order of columns, the macro should look for a column with the header "Close Date", cut it and insert is before a column with header "Bookings". Then, the macro should look for a column with the header "Description", cut it and insert is before a column with header "Selling BU". The macro needs to then cut two adjacent columns namely "Sector" and "Sub-Area" and insert it before the column with header "Total Bookings".

View 2 Replies View Related

Rearrange Table - Transpose Rows To Columns

Nov 2, 2007

I have problems to write a macro to rearrange the table from attachment file sheet1 to sheet2. I have many files that need to transpose rows to columns and with continually years, month, day, and the rest parameters. some to the files many content more then 20 years data.

View 5 Replies View Related

Creating A Hierarchy Of Non Numerical Data ?

Jan 28, 2009

I need to create a table of non numerical data that I can refer to in a formula, which will compare two pieces of data (both also inside this table), and based upon which is "higher up in the hierarchy" - the cell will display a certain result.
Basically it will be an IF function using non numerical data that has a numerical value / "rank" attached.

Specifically - I need to allocate values to this list in cells A1:A5...
EUR
GBP
AUD
NZD
USD
....where EUR is highest ranked and USD lowest.

Then in column B and C will be listed each of these values but in various combinations. In column D I will build simple IF functions to show the highest ranked in each combination. eg B1=EUR C1=GBP D1=IF(B1>C1,B1,C1)

View 3 Replies View Related

Create Hierarchy Of Data Types

Apr 28, 2009

My question is about creating a hierarchy of Data Types.

I need to code 3 Data Types:
1.) MealPlan
2.) Meal
3.) MealItem

MealPlan represents a daily meal plan. It should have a certain number of meals. An example of MealPlan would be "Healthy" and have a total of 3 meals. Meal represents a single meal. It should have a certain number of meal items. An example of Meal would be "Meal 1" and have a total of 3 meal items. MealItem represents a single meal item. It should have a certain number of protein calories, fat calories, carb calories. An example of MealItem would be "Broccoli" and have protein calories of .2, carb calories of .8, fat calories of .1.

By using Data Types, I hope to create meal plans, which are made up of meals, which are made of meal items. The following code creates a Data Type hierarchy for two Data Types. I've examined it closely but i'm still having a hard time recreating it for my needs as stated above.

View 3 Replies View Related

Roll Up Data Based On Hierarchy

Dec 4, 2011

I have case where i need to roll up data based on the hierarchy. I have hierarchy of 4 level as follow:

Level1 Level2 Level3 Level4 Country Region1 Dept1
Unit 1 Country Region1 Dept1
Unit 2 Country Region1 Dept1
Unit 3 Country Region1 Dept1
Unit 4 Country Region1 Dept1

[Code] ........

The data in all sheets is identical...so I created a macro to create template based on the rage. The problem is that the template is good for level 4 but not good for other level.

View 2 Replies View Related

Get Hierarchy Chart Automatically With Given Data Through Macros

May 25, 2014

I have been trying to think of a way to get a hierarchy chart automatically with given data through macros
In the attached excel sheet

Org. Charts (hierarchy) question.xlsm

Would it be possible to get the chart to do by itself if say I were to add items or remove items? Is there any way to do it for data automatically?

I extract the data from primavera as attached and I want to make the chart in excel automatically.

View 3 Replies View Related

Rearrange The Data

Jan 1, 2010

I've the data like this

Item 1,Item 2,Item 3
Product 1a,Product 1b,Product 1c
Product 2a,Product 2b,Product 2c

And I want to rearrange like this
Product 1a
Product 1b
Product 1c
Product 2a
Product 2b
Product 2c
Product 3a

View 9 Replies View Related

Rearrange Particular Data In Spreadsheet

Jun 11, 2014

Looking to re-arrange particular data in attached SS. Sample has the highlighted data which is then converted to the result SS. Have many rows with variable lengths for each record.

View 5 Replies View Related

Rearrange Data Into A Certain Format

Nov 24, 2007

I am seeking the expertise of you knowledge folks to advise me whether it is possible to create a "script" in Excel to jumble up certain letters in an entry?

Let me explain. What I have are 4 separate columns with data in them. I need to somehow rearrange them into a certain format, like an encryption I suppose.

Here's an example of some data I have :

COL 1 COL 2 COL 3 COL 4
ABCD EFGHIJ KLM NOPQ

What I need to do is jumble those up so they appear in the following format:

COL 1 COL 2 COL 3 COL 4
CDAB GFEHIJ LKM NPOQ

Is it possible to do this in Excel? You're probably wondering why I don't do it manually, but there are over 20,000 records that need jumbling up and obviously that would take a very long time.

View 10 Replies View Related

Rearrange Data Supplied By Others

Aug 28, 2009

I have been supplied a list of data (company name, address, tel no, email ect.) unfortunatly the data is not in the correct order. There is about 300 companies on the sheet.

Is there a way i can rearrange the data, i have attached a file to show the end result i am trying to acheive.

View 10 Replies View Related

Rearrange And Transpose Data

Oct 18, 2009

I need a macro to manipulate some data. The attached example contains more details.

View 2 Replies View Related

Copy And Rearrange Data?

Apr 17, 2012

We need to copy data from column A of sheet2 (from A2 to the last row) in sheet3 (from A2 to the last row).

In sheet2 column A
01.03.2012 10:05
02.03.2012 03:5617 h, 51 m, 02 s118.117.65.17510:C4:91:B6:96:B202.03.2012 10:3003.03.2012 01:2214 h, 51 m, 47 s116.100.124.13510:C4:91:B6:96:B203.03.2012 09:1903.03.2012 14:2405 h, 04 m, 56 s99.87.106.22810:C4:91:B6:96:B2

need to be in sheet3

Time INTime OUTDurationIPMac address01.03.2012 10:05
02.03.2012 03:5617 h, 51 m, 02 s118.117.65.17510:C4:91:B6:96:B202.03.2012 10:3003.03.2012 01:2214 h, 51 m, 47 s116.100.124.13510:C4:91:B6:96:B203.03.2012 09:1903.03.2012 14:2405 h, 04 m, 56 s99.87.106.22810:C4:91:B6:96:B2

In sheet2 column A is about 400 row and we need to copy this date every month in sheet3

I wish that every touch of the button to copy data in the first empty cell found, not to overwrite data.

View 4 Replies View Related

Macro To Rearrange Data

Dec 6, 2007

I need to write a macro which rearranges my data for me. The data looks like this;

Data______________Unit_____Jan06_____Feb06_____Mar06___(etc)
Coal consumption___tonnes
Coal energy________GJ
Electricity__________Mwh
Production_________tonnes
etc

This macro will need to be applied to a number of sheets with different time periods and different types of "Data". What I want to do is write a macro that will transform the data to look like this (where xxx is the data entries);

Coal consumption___xxxx____tonnes___Jan06
Coal consumption___xxxx____tonnes___Feb06
Coal consumption___xxxx____tonnes___Mar06
Coal energy________xxxx______GJ____Jan06
Coal energy________xxxx______GJ____Feb06
Coal energy________xxxx______GJ____Mar06
etc.

So that I can easily import it into access. I know basically how to do it, but I can't automate it to apply to a sheet with any stretch of data fields or types of data.

View 9 Replies View Related

Using A Macro To Extract And Rearrange Data?

Sep 6, 2009

I have a big collection of spreadsheets that are all laid out in the same fashion: from A2 down are the names of different individuals (one name per row). Column titles (from B1 right) are the names of unique qualifications that these individuals possess. In the cell where a row and column intersects is the date at which this qualification was awarded. If this doesn’t make total sense, I’ve attached a very basic version of this to the post (Sheet 1) – although the spreadsheets I’m working with have hundreds of individuals and scores of qualifications, rather than just a couple!

This data needs exporting/rearranging into a format that’s recognisable by another piece of software that we use. In this format, the data is split into three columns: the person’s name, a possessed qualification and the date it was awarded. This means that a single individual’s name may have multiple rows, since a different qualification will be present in each row for that person. An example of this layout is shown on Sheet 2 of the attachment.

View 2 Replies View Related

How To Rearrange Data Into Columns If It Is In Rows

Jan 15, 2013

I have an Excel sheet that is in rows. I want to separate the data into columns. Each sample is separated by a space in the rows. So sample 1 is A1 is the name and B1 is the actual name. A2 is the description and B2 is the description. Each sample is +or- rows. Sample 1 may be 8 rows but sample 2 may be 6 rows. What type of formula or macro do I use to arrange the samples into columns instead of rows so the data will be like A1 name, A2 description, etc... and A2 will be sample 2 name, and B2 will be sample 2 description, etc...

View 7 Replies View Related

Rearrange Data From Rows To Columns

Oct 7, 2006

I have an excel file with data that was entered in rows instead of columns and I need to rearrange the data into columns. Here's what my data looks like now, with what should be field names in column one and values in column two:

Company Name : Excel Company
First Name : Jack
Last Name : Smith
Phone : 555-661-6674
Email : ozgrid_rocks@excelgods.com
(this continues in a repeating pattern for thousands of rows)

I need the data like this:

Company Name : First Name : Last Name : Phone : Email
Excel Company : Jack : Smith : 555-# : ozgrid_rocks@url

View 5 Replies View Related

Rearrange Data Report Into Database For Pivot?

Aug 19, 2013

I have a report (roughly 4000 lines) which I need to rearrange for pivot/power-pivot use.

The structure for each row/record is:

col1 geography
col2 area
col3 customer
col4 product
col5 price
col6-65 monthly sales units - 5 years (columns labelled Jan 2009, Feb 2009 .... Dec 2013)

I want to rearrange the data as:

col 1-5 unchanged
col 6 month (data Jan 2009, Feb 2009, etc.)
col 7 sales units

Currently i have 4000 rows/records (each containing 65 fields). Iwant to end up with 4000 x 60 or 240,000 rows/records of 7 fields each. Is this possible through a data import wizard or VBA routine?

View 5 Replies View Related

Excel 2010 :: Macro Or VBA Code To Rearrange Data

Jul 5, 2012

I'm using Excel 2010 and XP. I have data in rows 1 -4 that can not be altered. There are headings in Row 5, B-L & Row 6, F-J.

Data starts in Row 7 and follows the headings. This repeats for several thousand rows. I need a way to move Row 6, F-J and put it on Row 5, M-Q

Row 6, F-J and put it on Row 5, M-Q
Row 8, F-J and put it on Row 7, M-Q
Row 10, F-J and put it on Row 9, M-Q
Row 12, F-J and put it on Row 11, M-Q
....
....
....

Then delete blank rows below Row 5

View 7 Replies View Related

Rearrange Slices Of Pie Chart In Descending Order Without Sorting Data?

Aug 27, 2013

How to rearrange slices of pie chart in descending order without sorting the data?

View 1 Replies View Related

Hyperlinking Texts In Hierarchy Chart?

Jul 2, 2013

I have created a hierarchy chart using smartart. Is there a way to hyperlink the texts in each box to other sheets in the workbook?

[URL]

View 3 Replies View Related

Creating Multiple Drop Box In Hierarchy

Apr 30, 2009

I did all the search for multiple drop box or list box that can connect to other list boxes but no luck.

It's the same as when you surf with Internet Explorer, you can click "Views" in menu bar, list box appear and then choose "Encoding", another drop box appear, then when you choose "More", then another box appear.

Is it possible to have this sort of hierarchy list box in excel where drop box connect to another drop box?

View 6 Replies View Related

Multiple Criteria On Index / Match With Hierarchy

Dec 29, 2011

The below formula was provided by PGC, and works great:

=INDEX($E$15:$E$18,MAX(IF($A$2:$A$8=A15,MATCH($E$2:$E$8,$E$15:$E$18,0))))

In post:
Complex Array(?) Search

Now, I would like to add the ability to perform this same action/concept, but using two different criteria.

So I want to keep the hierarchical listing of importance, but lookup/match within using more than one criteria.

Example:
I have an order of superseding to apply to results of a search for Fruit.
Great
Good
Fair
Poor
(so Good supersedes, Great; Fair supersedes, Good; etc.)

Column A____Column B____Column E
Apple_______Red_________Fair
Apple_______Red_________Poor
Apple_______Green_______Great
Pear________Red_________Great
Pear________Yellow_______Great
Pear________Red_________Good
Pear________Red_________Fair

I want my verification to return all the worst Red fruit:
For Apple Red: Poor
For Pear Red: Fair

View 1 Replies View Related

Change Vertical Rolling Hierarchy To Horizontal

Sep 19, 2007

The accounts listed on this report change on a monthly basis. I am attempting to create a macro or write a formula that can but used each month to fill in this list automatically. On Sheet 1 is a short example of what the report looks like when exported into excel. The numbers on the left are the numerical hierarchy. The long set of numbers are the account numbers and the others are the categories that each are located under.

Sheet 2 is what I need the end result to look like. One of the problems I am running into is how to handle the fact that the hierarchy re-uses numbers. The hierarchy always runs vertical, therefore "5" always falls under the "4" that is directly above but when there is another "4" it should be ignored and continue on up the chart until it finds the first "3" and place that in the cell to the right then find the first "2" and so on.

View 2 Replies View Related

Create Parent Child Relationship From Hierarchy

Feb 7, 2008

I have an excel file (see sample attached) with a hierarchy with parents and children spread across different columns and rows. However, I am trying to condense it into one column with parents and one column with children. The only way I've been able to do this is by copying and pasting parents onto children rows, which is both a manual and time-consuming process (when you have a lot of rows). I feel like there must be a way to use VBA or a formula or something to get it to work. I have attached a sample, so you can see what I am trying to do (current data and desired data).

View 6 Replies View Related

Slicer Hierarchy Value Sorting - Selected Values Won't Sort To Top

Nov 25, 2013

I have two slicers that are in a hierarchy. These are attached to a Pivot table whose data source is an OLAP cube. Every Partner Parent is part of a Partner Group:

Partner Parents Slicers.png

My problem is that when I click SI Alliance in Partner Group, the Partner Parent slicer does not re-sort in any way. The corresponding selected Partner Parents are scattered throughout the alphabetical list. However, in a different document, I have slicers in a similar situation, except their Pivot table’s data source is a SQL Server database. When I click on a member of the higher up group (Accenture Global Client) the lower level group (Microsoft Account Name) sorts to show only the selected values at the top of the list:

This is with all selected - Accenture Slicers All.png

This is with just one Accenture Global Client selected. Note how the selected Microsoft Account Names have moved to the top of the list - Accenture Slicers Selected.png

How I can configure my Partner Parent/Partner Group slicers to behave like these Accenture/Microsoft slicers? Is there something that I can change in Excel or in the OLAP cube to make this happen? I have already tried right-clicking the slicer and going to Slicer Settings. The settings on the Parent/Partner Group slicers mimic those of the Accenture/Microsoft slicers exactly.

View 4 Replies View Related

Got Stuck In Middle To Display Hierarchy Of Employee In Organization

Aug 5, 2014

I am supposed assign macro to track all employees hierarchy in an organisation.

In Sheet1 I have Employee ID's in D Column and Supervisor ID's in N Column.

And In Sheet2 I assigned macro...

What exactly I need is when I give number and click the button I need all the employee id's in his hierarchy

Concept:

The number which you give should search in N Column and Display D Column Values...and those D column values should search in N column and display D column values....so on.....

So far, it is showing 1 level hierarchy...but I need till end...

View 14 Replies View Related

Recursively & Conditionally Move/Loop Through Folder Hierarchy To Fill Array

May 7, 2008

i am use dir to put into an array all the folders in a folder then enter the first folder and repeat. the problem i am having is when it encounters a file it also puts it into the array and then errors once it trys to enter that "folder" (which is a file)

right now the code doesnt do anything but the plan is then to call another subroutine that lists all the files im looking for in a folder (that sub does work)

what am i doing wrong? all the things i can find on google show it the way i am doing it.

Sub GetDirList(topfolder As String)
Dim FolderArray() As Variant
Dim FolderCount As Integer
Dim FolderName As String

FolderCount = 0
FolderName = Dir(topfolder, vbDirectory)
' Loop until no more folders are found
Do While FolderName <> ""
If Not FolderName = "." Then
If Not FolderName = ".." Then
FolderCount = FolderCount + 1
Redim Preserve FolderArray(1 To FolderCount)
FolderArray(FolderCount) = FolderName
End If
End If

View 3 Replies View Related

Rearrange Numbers In A Cell

Jul 31, 2009

I have a column of numbers that are "dated" like this:

90421

This number represents the date: April 21 2009

Is there a way to rearrange the numbers in the cell so I can then format as a date that looks like this: 4/21/2009?

View 11 Replies View Related







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