Solved

Excel 7.0 Dynamic Pivot Table FORMATTING

Posted on 1998-04-29
6
714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
office 2016 license quastion 3 45
Excel VBA Script 9 57
Office 365 Controls 3 21
VBA to Import multiple excel files into a worksheet 5 15
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
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 walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

751 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