Next Question
Email to a friend |
RSS
No Best Answer Selected, Tip Refunded
1-) Instead of months, use the month numbers, like 1 for January and so on.
Then, use this formula
=CONCATENATE($A5,"-",RIGHT("0" & B$4,2))
Where A5 is "1948" cell and B4 is "1" cell (for January). Then, just apply the formula to the other cells and this should work fine. This will also take care of the leading zeros, so it will show: "1948-01" as you wanted.
Here is the link of the file that I did as an example:
http://www.yousendit.com/download/WnBTZEV5OC83bUJMWEE9PQ
Source(s):
I just know. :)
Permalink | Report
electricbr...
http://en.wikipedia.org/wiki/Pivot_table
Source(s):
http://en.wikipedia.org/wiki/Pivot_table
Permalink | Report
=INDIRECT(ADDRESS(P$5+P$7,P4+P$6))
picture here: http://twitpic.com/117rz
green areas I assume you can easily populate out.
Source(s):
just me.
Permalink | Report
Anyway, you can look at this as two problems:
1) Get all of the data arranged on one row instead of 60.
-- one way to do this is 60 cut/copy and paste operations. Boring, but definitely will solve the problem. I think a key combination like End-right arrow or control-right arrow may help you position the cursor at the "edge" of the data (at least for Excel).
Another way to do this would be to use CELL("value", range) to lookup the value where you would basically divide the column number (e.g. column("A5")) by 12 to get the row number. The problem with this, besides being a difficult formula is that it does require programming because amazingly there isn't any way to specify a cell based on row and column number (in a regular formula) and in order to convert column numbers into column letters you need a VBA function http://www.freevbcode.com/ShowCode.asp?ID=4303 .
2) Properly label each column according to YYYY-MM.
-- The simplest thing to do would be to copy these values from the worksheet generated by lfnovo.
Down the line if you want to keep analyzing the data, Pivot Tables or OLAP might be helpful. If you can get the data into MS Access then I think you can use Excel's OLAP features with Access. Certainly you can do that with SQL Server.
Permalink | Report
Question
M$2
January 09, 2009 08:59 PM
How to convert a spreadsheet with years as rows and months (Jan-Dec) as columns into YYYY-MM columns only
Suppose a spreadsheet where the leftmost column has years from 1948 to 2008. The topmost row has months January to December.
What I'd like to know is a clever way to convert this data, without programming, into a YYYY-MM columns from Jan 1948 to Dec 2008, with the data values in one row under each appropriate month.
What's the best way to do this?
What I'd like to know is a clever way to convert this data, without programming, into a YYYY-MM columns from Jan 1948 to Dec 2008, with the data values in one row under each appropriate month.
What's the best way to do this?
Interesting Question?
Yes (0)
No (0)
- In Technology & Internet |
- |
- Report |
-
Share
RSS
No Best Answer Selected, Tip Refunded
Answers (5)
January 09, 2009 09:18 PM
The way I would do it is: 1-) Instead of months, use the month numbers, like 1 for January and so on.
Then, use this formula
=CONCATENATE($A5,"-",RIGHT("0" & B$4,2))
Where A5 is "1948" cell and B4 is "1" cell (for January). Then, just apply the formula to the other cells and this should work fine. This will also take care of the leading zeros, so it will show: "1948-01" as you wanted.
Here is the link of the file that I did as an example:
http://www.yousendit.com/download/WnBTZEV5OC83bUJMWEE9PQ
Source(s):
I just know. :)
Permalink | Report
electricbr...
January 09, 2009 11:35 PM
Your approach arrives at the wrong answer faster than mine, which deserves some honorable mention, but unfortunately it doesn't arrange them in single series columnar format which is my objective. It arranges the dates row-by-row, in dozens, instead of as one continuous set of adjacent columns (proceeding from January 1948 at A1 until December 2008 at An). Hope this makes sense.
Tip electricbrain for this comment
Report
January 09, 2009 11:32 PM
Your approach arrives at the wrong answer faster than mine, which deserves some honorable mention, but unfortunately it doesn't arrange them in single series columnar format which is my objective. It arranges the dates row-by-row, in dozens, instead of as one continuous set of adjacent columns (proceeding from January 1948 at A1 until December 2008 at An). Hope this makes sense.
Report
January 09, 2009 11:37 PM
Sorry--my first reply was meant for Ifnovo.
I'm using OpenOffice actually, but I can live with an Excel solution if that's provided. They are pretty comparable in most cases.
I want to serialize data that I currently have in an X-Y format. Specifically, it is the Bureau of Labor Statistics unemployment figures, which are delivered in an X-Y chart from the BLS Web site (with years as the row labels and months as the column identifiers). I would like to translate this into serialized unemployment rate per month so that I can mix the data with other month-pegged data to do some comparisons and contrasts.
Report
I'm using OpenOffice actually, but I can live with an Excel solution if that's provided. They are pretty comparable in most cases.
I want to serialize data that I currently have in an X-Y format. Specifically, it is the Bureau of Labor Statistics unemployment figures, which are delivered in an X-Y chart from the BLS Web site (with years as the row labels and months as the column identifiers). I would like to translate this into serialized unemployment rate per month so that I can mix the data with other month-pegged data to do some comparisons and contrasts.
January 10, 2009 01:36 PM
So where are you mixing the data? Still in a spreadsheet? It would be easier to write a formula that can pull from an x/y chart rather than stringing the chart out.
Report
January 09, 2009 09:47 PM
Yeah it sounds like what you want is a Pivot Table. which you can get MS Excel to do pretty easily. http://en.wikipedia.org/wiki/Pivot_table
Source(s):
http://en.wikipedia.org/wiki/Pivot_table
Permalink | Report
January 09, 2009 10:11 PM
As themshow said, if you have enough cols, this is what I would use. =INDIRECT(ADDRESS(P$5+P$7,P4+P$6))
picture here: http://twitpic.com/117rz
green areas I assume you can easily populate out.
Source(s):
just me.
Permalink | Report
January 09, 2009 11:32 PM
See my comments to Ifnovo; your answer might have something to it but frankly I don't quite understand how to apply it.
Report
January 10, 2009 12:17 AM
I will post a video when I get home (faster connection),and you can use the formula [=IF(AVERAGE(O2:Z2)=Z2,Z2+1,Z2) to get your row of years populated across all the columns. For example, if you at least make 12 columns of value "1948" starting at cell"O2" than the 13th column put that formula and copying all they way out.
Report
January 10, 2009 12:35 AM
I guess I could have just put the example xlsx file somewhere for you too.
http://cid-8a0f84dc4bf39da9.skydrive.live.com/self.aspx/Public/Book2.xlsx
Report
http://cid-8a0f84dc4bf39da9.skydrive.live.com/self.aspx/Public/Book2.xlsx
January 10, 2009 01:04 AM
If you are going to run out of columns like he says then you are just going to run out of columns and there isn't anything we can do about that. You can convert some of the data into your format until you run out of columns. Maybe analyzing the most recent ten years of data or something will be useful. Anyway, you can look at this as two problems:
1) Get all of the data arranged on one row instead of 60.
-- one way to do this is 60 cut/copy and paste operations. Boring, but definitely will solve the problem. I think a key combination like End-right arrow or control-right arrow may help you position the cursor at the "edge" of the data (at least for Excel).
Another way to do this would be to use CELL("value", range) to lookup the value where you would basically divide the column number (e.g. column("A5")) by 12 to get the row number. The problem with this, besides being a difficult formula is that it does require programming because amazingly there isn't any way to specify a cell based on row and column number (in a regular formula) and in order to convert column numbers into column letters you need a VBA function http://www.freevbcode.com/ShowCode.asp?ID=4303 .
2) Properly label each column according to YYYY-MM.
-- The simplest thing to do would be to copy these values from the worksheet generated by lfnovo.
Down the line if you want to keep analyzing the data, Pivot Tables or OLAP might be helpful. If you can get the data into MS Access then I think you can use Excel's OLAP features with Access. Certainly you can do that with SQL Server.
Permalink | Report
Answer this Question
Related Questions
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- klabie, November 23, 2009 06:41 PM
- ainehowardskinn..., November 23, 2009 06:30 PM
- whiteroses, November 23, 2009 06:27 PM
- akhmallanuar, November 23, 2009 06:27 PM
- shadratt, November 23, 2009 06:23 PM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More