View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Geoff Geoff is offline
external usenet poster
 
Posts: 371
Default calculatedfields

Hi,
I have 2 table titles in a spreadsheet, 'Rest & Breaks" and 'Driving
Time'. When creating a PivotTable I get :
..PivotFields("Rest & Breaks") and
..PivotFields("Driving Time")

These are ok but how do i create a calculated field adding the 2 values
together? The following line does not work:

..CalculatedFields.Add "Duty Time", "=Rest & Breaks + Driving Time", True

I believe it is the '&' in Rest & Breaks which is the problem.

How can I get round this please without altering the titles.

T.I.A.

Geoff