Link to home
Start Free TrialLog in
Avatar of easycapital
easycapitalFlag for Macao

asked on

Macro to take a table and convert into a Pivot table ready table

Quick support from the experts is needed to create a macro which step 1 & 2 below (this answer the question posted here - a follow up question will be posted now also to deal with another approach to the same problem):

1. takes the table in the attached excel file in sheet "Data". This is the sheet with the input to the Macro. The input table has the date displayed as a report and the challenge here is to create a tabel readable to Pivot Tables.

2. Needing macro to create an output of a table based only on 3 column headers "Project", "Milestone", "Date", see sheet "Macro_Output".
0_Table_Macro.xlsx
Avatar of Doug
Doug
Flag of United States of America image

Easycapital,
You have 24 hidden columns (B through Y). Will the hidden columns eventually have unneeded data in them?
Avatar of easycapital

ASKER

Yes.
This is how the table is set up right now.
Easy,
See if the attachment works for you.
Sorry.
I see no attachment.
ASKER CERTIFIED SOLUTION
Avatar of Doug
Doug
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Looks.
Though not sure how it works.
Can I have more than two Projects with same date and milestone?
Run it from the VBA window (ALT+F11). In the project window (top left), click on the Modules folder. Double click on basStructureData. At the top right of the VBA window, look for the dropdown list that reads: (Declarations). Click that dropdown arrow and select ConvertTable, then press the F5 key. If this works for you then we can add a button to activate it.

You can have the same date and milestone for multiple projects. Each project just needs to be on its own row.
Excellent!
With a menu and everything!
Easy,
Button included on the Data sheet.
0_Table_Macro-with-button_dgb.xlsm
I accepted the solution because it creates the 3 columns as indicated in my original question above.

though still need to resolve having multiple Projects and milestones with same date how do I get that to work.

This would resolve my following question:
https://www.experts-exchange.com/questions/28748700/Macro-to-create-a-repoart-from-a-table-Excel-2010.html

Format is not a problem is more to find the solution to have multiple answers in same cel..
Right, I've commented on the other issue. Let's handle it in that separate thread rather than here.
ok