Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How to Use VBA to Group and Transpose Data...

This is just a sample of my data for two customers:

A B C D E
1 Quarter CustomerID ProdID Sales
2 20080930 Cust813 p1221 532
3 20080930 Cust813 p3368 2322
4 20080930 Cust813 p4340 2339
5 20081231 Cust813 p3368 778378
6 20081231 Cust813 p4340 8626
7 20081231 Cust813 p2150 132
8 20090331 Cust813 p4230 309
9 20090630 Cust813 p3368 1767
10 20090630 Cust813 p4340 1245


13 20080930 Cust866 p5526 6838
14 20080930 Cust866 p7204 7146
15 20081231 Cust866 p3368 7778
16 20081231 Cust866 p4230 8626
17 20081231 Cust866 pF577 132
18 20090331 Cust866 pG105 309
19 20081231 Cust866 p4340 1767
20 20120630 Cust866 p2150 1245
21 …


Results Desired:
20080930 20081231 20090331 20090630
Cust813 0.992731937 90.23626246 1.419277108
Cust866 4.401810979

0.992731937 is the result of E3/E4 (2322/2339)
90.23626246 is the result of E5/E6
4.401810979 is the result of E15/E19

I need to transpose the quarter date as column and for each customerID, I want to see the result of calculations of their ProdID p3368 / ProdID p4340 (for other cases, it will be more variables involved).

Should I do this using sql stored procedures since I am not so sure how to handle it in excel...

Maybe I can group it by CustomerID and then search for the ProdID but I don't know how to transpose Qarter Date is to show once only.

I appreciate any suggestions.

Faye


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
vba code to filter the data like a group with group header [email protected] Excel Programming 5 April 16th 13 01:36 AM
Group under Data Group and Outline Data not working. Help. Michele Excel Worksheet Functions 2 May 18th 09 07:45 PM
How do I group and transpose data - macro help needed. Chris Mitchell Excel Worksheet Functions 4 January 20th 09 02:35 PM
Copy Data from One Group of Cells to Another Group Alan Auerbach Charts and Charting in Excel 2 May 27th 07 04:12 PM
TRANSPOSE 'group' of columns to rows tom Excel Discussion (Misc queries) 1 December 14th 06 06:19 AM


All times are GMT +1. The time now is 10:31 AM.

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

About Us

"It's about Microsoft Excel"