Convert Table From Wide To Tall?
Sep 26, 2012How can I convert the top dataset to the bottom dataset?
Row Labels
2011.13
2011.14
2011.15
[Code].....
How can I convert the top dataset to the bottom dataset?
Row Labels
2011.13
2011.14
2011.15
[Code].....
I'm trying to execute a macro and it won't put the focus (radio button) to select x pages wide by x pages tall in the Page Setup/Page/Scaling Area. I looked at the macro and can't find a setting in the code but yet the focus won't change. What can I do about this? In other words the radio button stays selected as "adjust to "" % of normal size. Here's the code...
View 2 Replies View RelatedI have a very large excel data file, which I want to analyse using pivot tables. The problem is that while most of the columns are headed with the variable name (e.g. country) and have the list of variables displayed under that heading for each observation (e.g. Italy), the years are spread across the columns - i.e. the heading for column X is not "Year", but is 2003, with the next column being 2004, etc.
Is there a quick way I can re-arrange the data so that the layout is consistent and so that I can use it for pivot tables? I have way too many observations to do this by hand.
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
I am creating a rather large system that is as OOP as I am able to with VBA (Please let the next version of VBA use .NET!).
I have created an ErrorHandler object that deals with all logic/user errors and I have decided to include runtime errors in it's scope as well.
Now I have an object function to catch all errors as such:
Public Function CatchAll(E As ErrObject)
Select Case E.Number
Case xxx
...
Case Else
MsgBox E.Number & ": " & E.Description & vbCrLf & E.Source
End Select
End Function
Now I have added the following to every single procedure and function in my application, and have realised how ridiculous it is.
On Error Goto ErrorHandling
...
ErrorHandling:
ErrorHandler.Catchall Err
Is there a way to add a single global ErrorHandling statement somewhere in my code that will be called whenever an error is raised?
Perhaps in my main module that fires all code, can I put a small procedure that will handle the errors? Or as a function in my ErrorHandler class that I call on initialisation?
I have received a database containing listings of products and their sales, by month (see left side of attached file). What I actually need is to have this table converted (transposed) into a “flat database” which I can later manipulate with a pivot table (see desired output on the right side of the attached file). In the attached file I have drafted the desired output format of 1 line from the raw table, which I would like to get.
What I am looking for (if I might be so bold and ask) is a macro that will allow me to have a simmilar result for ALL the lines (there can quite a few). I think this output format can be achieved with a few simple loops, probably nested, but unfortunately I was not able to find the right sequence (being a novice in VBA).
I have tried to find the answer here, between all the posts regarding “transpose” but couldn’t find something that looked (to me) as containing a relevant solution.
I need to convert data from long to wide form but I haven't been able to do it. I want to try and avoid using vba because I have exactly 5 hours of experience with it, but if there is no other way I will just have to learn it quick.
View 4 Replies View RelatedI am looking to write 'conditional format' to only highlight cells that are 2 greater than the cell in the previous column.
[IMG]capture.jpeg[/IMG]
For instance:- cell F14 (which is 2 bigger than E14) and H23 (which is 2 greater than G23).
I am trying to get a module wide variable to provide the current filename to the various subs.
View 2 Replies View RelatedI need to create hundreds of named ranges going down a single sheet.
The name of the first range is in cell a1 and is 13 columns wide and 7 columns high (a1:m7)
The next name is in a8 and the range is a8:m14 and so fourth
If it's easier on a separate sheet I can have a list of names I want in column A and then the cells they refer to in column B.
E.g.
A B
Range1 Sheet1!A1:M7
Range2 Sheet1!A8:M14
Range3 Sheet1!A15:M21
I am trying to convert a table into three columns so that I can use the data in a vlookup.
View 8 Replies View RelatedI am doing a literature review and at the moment I have a table where I am listing all articles and ticking of their "theme", "theories used" and "methodology" like this:
How_do_I_get_from-this.jpg
Now I need to map the theories onto the articles, like this:
to_this.jpg
How do I accomplish this? (in an automated manner, obviously)
I hope the pictures are sufficiently self-explanatory, it is kind of hard to explain what I am trying to achieve otherwise. Note that ticking boxes is accomplished by changing the font to wingdings 2 and using uppercase P for checking a box. I know there are real checkboxes for this purpose, but I am generating the table from imported data and can't find another way to program excel to tick boxes if a condition evaluates to true.
Go to this link to download the original file: [URL] ....
How do i consistently convert a PDF table to Excel? When in the PDF i am recognizing the text and then trying all available ways to either copy or export the selection (to all available file types!) but it only works in a usable manner about 10% of the time....
View 5 Replies View RelatedI need to convert a Matrix to a Table. Something like this:
Input file:
Capture1.PNG
Output :
Capture2.PNG
I have three columns of data starting in row 5, the headers of these columns show Origin, Destination and mileage. Is it possible to have a macro that converts the data into a table?
View 2 Replies View RelatedI am trying to convert a table into a list, please see the example, I want to convert this table
10547
aaa
140x200
160x230
300x400
10549
bbb
140x200
150x260
[Code] ........
I need to convert this kind of table to a list (like in below example)
Can someone give me an instruction or macro to do this ?
Table
X Y Z
A 3 5 7
B 2 4 6
C 8 9 10
List
Column1 Column2 Column3
A X 3
A Y 5
A Z 7
B X 2
B Y 4
B Z 6
C X 8
C Y 9
C Z 10
In the attached file you'll find an original table and the requested Table in its new layout. I thought to use TRANSPOSE in an Array- Function but it didn't work as expected. However, I managed to present the DATA (light green range) with the help of SumProduct. My Question goes like this: Is there a way to present the Upper and Left Headers (in red font) with Formulas ?! (I typed them by hand).
View 2 Replies View RelatedI have a large frequency table, the dataset looks like:-
Category Age Frequency
A 1 4
A 2 3
A 3 2
B 7 1
B 8 3
C 4 2
C 6 4
I would like a formula to get:
A B C
1 7 4
1 8 4
1 8 6
1 8 6
2 6
2 6
2
3
3
I have a table with Companies in a column and Countries in the heading row. Now in this table I have an entry "1" against certain countries for each company.
I need to get a concatenated (Company&Country) list, but I need this is all in a single column.
Companies list.xlsx
I have a table in Sheet1 and it's about of student's name, lessons and class.
I want to create a macro which convert to all data like Sheet2.
Need to fit my raw data (Raw Data Sheet) to fit my table template.
Need to convert my daily data to weekly to fit to my table template.
Please see attached file for reference.
I've posted an example workbook that has sheet1 as how the data comes and sheet2 as what I need it to look like (through some kind of automatic process). I really don't have a clue as to how to get this done, and I'm guessing some VBA is going to be required.
View 3 Replies View RelatedI would like to convert the data by VBA macro from a table format into a list format. The convention of the TABLE data is as follows:
First row is Header Titles
[TABLE]
[SITE],[LOC],[PROD], [MTH1], [MTH2], to ->[MTH12]
North, Office, Cooling, 100, 125, 85
[/TABLE]
I would like the data to be provided into a list format for each month.
For example:
[TABLE]
Row 1: North, Office, Cooling, Month 1, Value
Row 2: North, Office, Heating, Month 1, Value
Row 3: North, Office, Electricity, Month 1, Value
Row 4: North, Retail, Cooling, Month 1, Value
Row 5: North, Retail, Heating, Month 1, Value
Row 6: North, Retail, Electricity, Month 1, Value
etc
[/TABLE]
I have a two dimentional table that I want to be able to convert to single dimention records so I can import into database as records.
Sample two dimentional table
Description, Week1, Week2, Week 3,
Widget1, 200, 100, 150
Widget2, 75, 25, 30
Widget3, 10, 20, 30
I want to be able to convert above table into format as below
Widget1, week1, 200
Widget1, week2, 100
widget1, week3, 150
widget2, week1, 75
widget2, week2, 25
widget2, week3, 30
widget3, week1, 10
widget3, week2, 20
widget3, week3, 30
I do this each week with with approx, 40,000 records, (single dimention) copying and pasting is becoming a chore. Does anyone know a method to address this via functions, macros, formulas, etc. Number of rows and columns vary each time I repeat the exercise.
I am relatively new to VBA and am trying to convert a range of data to a table in the same sheet. I receive the following message when I try to run the code as shown below:
"The worksheet for the table data must be the same sheet as the table being created." The code stops on the third line of the code.
Sheets("Data Forwards").Select
ActiveSheet.Range("$A$1:$U$1000").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$U$1000"), , xlYes).Name = _
"Table1"
ActiveSheet.Range("Table1[#All]").Select
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleMedium2"
I can see that the range is highlighted in the sheet before the code breaks.
I have a pivot table & want use the following to convert the cell from number to text under the Format Cell -> Custom. If I just type in [=1]"COA Denied";[=2]"Deferred to Future Class"; .... it works
However, I add more condition after , it won't work
[=1]"COA Denied";[=2]"Deferred to Future Class";[=3]"Offer Accepted - Confirmed";[=4]"Offer Declined";[=5]"Offer Waitlist Position";[=6]"Student Withdrawal Post Interview";[=7]"Waitlist Declined";
I have a list or log that is updated by a number of people on a sharepoint file. The list consists essentially of 2 columns - lets call them Location and Date.
The Locations are populated from a pulldown list but can be repeated a number of times throughout the list. I have the list set up using Table Formatting so the range updates dynamically
Example:
Location Date
Site1 8/1
Site2 8/2
Site3 8/3
Site4 8/5
Site2 8/6
Site2 8/7
Site3 8/8
As this list gets items added to it I want to populate a summary table on another sheet showing the dates each site was visited like this...
____8/1 8/2 8/3 8/4 8/5 8/6 8/7 8/8 8/9
Site1 X
Site2 -----X-------------X---X
Site3 -------X
Site4 --------------X
(Had to add dashes above to get the X's spaced out properly)
I'm competent with lookups and such but I imagine this needs an array formula or some index/match combination which I'm a little weak on.
The solution should also not require any updating as the source list is updated periodically.
I have a table with unsorted Time Data and Headings for each Row and Column (See attachment). I need to display this data in another worksheet as a scrollable list.
Then when I click on any list item, it displays only that data in the following format:
A1 = Time. A2 = Row Heading. A3 = Column Heading.
Easier to understand if you view the simple spreadsheet attached.
I am trying to make some of my data validation dropdown list boxes narrower. I was told one way to do that is to use combo boxes. (If there are any other ways, please let me know!)
I don't think my combo boxes are working. I had tried to make a combo box appear in each data validation pulldown cell by using this tutorial:
http://www.contextures.com/xlDataVal10.html
I followed this tutorial word for word, but when I try to test the code at the end by double-clicking on a data validation pulldown cell, no combo box appears.