Solved

Excel 7.0 Dynamic Pivot Table FORMATTING

Posted on 1998-04-29
6
711 Views
Last Modified: 2010-07-27
In Excel97 the pivot table has the ability to enable fields and format their contents and data anyway you want.  If you click on a field it will select everything related with it.  You can then select a format for that data.  When you refresh the pivot table, the format STAYS.

However, in Excel 7.0, you CANNOT dynamically format.  There isn't an enable function and when you apply formats to the data individually through the "normal" process, they disappear when the table is refreshed.

I would like to find out whatever information i can to get Excel 7.0 to dynamically format (ENABLE FEILDS or produce code that will recognize certain feild names and format the data accordingly, ie..If  TransType (field name) = "revenue" (item in field)  then format with $ and no decimals and have the format REMAIN when the table is refreshed.
0
Comment
Question by:corboy
6 Comments
 

Expert Comment

by:davespitzer
ID: 1603283
What do you mean with refreshing the tabel I don't have a refresh option in excel 7.0? I have the dutch version because I live in the Netherlands but I don't think this will make a difference.
0
 
LVL 1

Expert Comment

by:SteveWood
ID: 1603284
I have had a quick look at this and to be honest I am unable to get the pivot table to take up the formating from the source data.  However if I format the cells in the table in the normal manner, refreshing does not lose the formatting.

Any more details from you would be helpful.
0
 

Author Comment

by:corboy
ID: 1603285
As far as I know Excel 7.0 does not retain formatting in a pivot table UNLESS it is a format created by the "auto-format" tool.  In Excel '97 you have the ability to retain formatting even after refreshing without any problems..  

I am looking to develop some code that would recognize ALL records with for example "transaction" in them.  By record i mean this for example:  Product(ABC)   Client(Micro world)  Revenue(Transaction)  Year (1998)  Jan(1,230) Feb (1,450)

This record has Transaction in the revenue field.  The code needs to recognize that and format ONLY the Jan and Feb fields as Long Intergers with ",000" comma seperator.

The database I am working with needs to also format Income as Currency with two decimal places and other formatting changes.

Any input would be greatly appreciated....Thanks for all the help so far

Cory Straim
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 2

Expert Comment

by:the_whelk
ID: 1603286
Create a macro in a new workbook that applies the required formats to the cells you want. That may be quite a task at first. Once created you can use this macro every time you want to create your pivot table.

This may be quite useful if require different formatting at different times. As you can have more than one macro and just run the appropriate one for your requirements.
0
 

Author Comment

by:corboy
ID: 1603287
The macro is ONLY useful if the cells are NOT dynamic, however in a pivot table the cells are constantly changing positions depending on how the pivot tables are set up....This pivot table is within a large database.  There are many different users with many different needs.  This will require Code that will reference an specific item in all records that contain it and switch the number format or text format automatically.  A macro will just refernce cells.  This cannot work for this reason.

If the record i want to refernence is in row 2 of the pivot table..and I change the pivot table to where the record is now not there.  The format will remain the same in row two regardless of what record is in it.
0
 

Accepted Solution

by:
jericho052398 earned 150 total points
ID: 1603288
Write a Visual Basic module that produces a new view for the user, in other words the user will not see the pivot table per se, but will instead see a "temporary" worksheet that reproduces the pivot table data with appropriate formats.  This can easily be accomplished by writing the module so that every time a pivot table is produced, the entire sheet is copied and then the "paste special" option is used to paste only the values into a new worksheet. Then, depending on the data types, "if" statements can be used to properly format the data.  The new sheet can be saved or replaced the next time a pivot table command is invoked.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
Outlook Free & Paid Tools
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question