Solved

Excel 7.0 Dynamic Pivot Table FORMATTING

Posted on 1998-04-29
6
699 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:the_whelk
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Article by: dandraka
There are several quick shortcuts that can make your life easier in Microsoft Programs.  These simple tips and tricks will your work more productive and you faster at completing your tasks! MS Word (1) Creating Re-usable Scraps You can create s…
Outlook Free & Paid Tools
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now