Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Converting a report into a Pivot Table format

Hi all,

I desperately need to convert a report I receive every month into a
pivot table format.
Here is the table:

Country Jan Feb Mar Apr May June ..... Dec
France 2 3 4 5 6 7
Spain 8 9 10 11 12 13 etc
etc

I want to convert this into a pivot table format like:

Country Month Value
France Jan 2
France Feb 3
Spain Sept etc

The list of countries is around 170 lines long.
I have 13 month (12 months + total)

I have to do the same with several reports, however each report is
built on some variables like:
- Year
- Data type (Actual, Budget, etc)
- Product (Bananas, Apples, Cherries, etc)
- Sub-Product (American Bananas, Australian Bananas, Indian Cherries,
etc)
- Currency (Dollar, Euro, etc)

The reason why I take by currency is to calculate any FX impact on the
revenue.
The reason I take it by product (and sub product) is to be able to see
it both from product view or country view.

It would be great if in adittion to converting the existind data on the
table, I could also enter on a few popup questions the variables I used
(currency, product, etc) and that these got repeated on some extra
columns so when I merge all the different reports I know which data
relates to what report.

Can anyone please help me convert this table?


Thanks in advance


Leo

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Converting a report into a Pivot Table format

Sub ReorientData()
Dim lastrow as Long, i as Long
lastrow = cells(rows.count,1).end(xlup)
for i = lastrow to 2 step -1
cells(i+1,1).Resize(12,1).EntireRow.Insert
cells(i,2).Resize(1,13).copy
cells(i,3).Pastespecial xlValues, Transpose:=True
cells(1,2).Resize(1,13).copy
cells(i,2).Pastespecial xlValues, Transpose:=True
Next
Range("D1").Resize(1,11).Entirecolumn.Delete
Range("C1").value = "Amount"
Range("B1").Value = "Month"
End Sub

Untested. Test on a copy of your data.

--
Regards,
Tom Ogilvy




" wrote:

Hi all,

I desperately need to convert a report I receive every month into a
pivot table format.
Here is the table:

Country Jan Feb Mar Apr May June ..... Dec
France 2 3 4 5 6 7
Spain 8 9 10 11 12 13 etc
etc

I want to convert this into a pivot table format like:

Country Month Value
France Jan 2
France Feb 3
Spain Sept etc

The list of countries is around 170 lines long.
I have 13 month (12 months + total)

I have to do the same with several reports, however each report is
built on some variables like:
- Year
- Data type (Actual, Budget, etc)
- Product (Bananas, Apples, Cherries, etc)
- Sub-Product (American Bananas, Australian Bananas, Indian Cherries,
etc)
- Currency (Dollar, Euro, etc)

The reason why I take by currency is to calculate any FX impact on the
revenue.
The reason I take it by product (and sub product) is to be able to see
it both from product view or country view.

It would be great if in adittion to converting the existind data on the
table, I could also enter on a few popup questions the variables I used
(currency, product, etc) and that these got repeated on some extra
columns so when I merge all the different reports I know which data
relates to what report.

Can anyone please help me convert this table?


Thanks in advance


Leo


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Format - Pivot Table not working Melissa Excel Discussion (Misc queries) 4 August 29th 08 03:24 AM
how do I format data into columns using a pivot table report? snd Excel Discussion (Misc queries) 1 April 24th 06 09:01 PM
pivot table format report - setting default stevep Excel Discussion (Misc queries) 0 December 14th 05 03:26 PM
A pivot table report cannot overlap another pivot table report. David Excel Discussion (Misc queries) 1 June 23rd 05 11:42 PM
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" Diana[_5_] Excel Programming 0 August 21st 03 10:19 PM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"