Link to home
Start Free TrialLog in
Avatar of corboy
corboy

asked on

Excel 7.0 Dynamic Pivot Table FORMATTING

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.
Avatar of davespitzer
davespitzer

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.
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.
Avatar of corboy

ASKER

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
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.
Avatar of corboy

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of jericho052398
jericho052398

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