You are here:

# Excel/Calculated Field - pivot

Question
Good morning Edward,
I'm trying to calculate the NETWORKDAYS between the MIN date and MAX date in a pivot table.

I successfully got the MIN & MAX date in the pivot table but when a create the formula below, it returns 0,

=NETWORKDAYS(MIN(StartDate),MAX(StartDate))

Do you see what I do wrong?
Maybe what I want is not feasible to obtain from a pivot?

Result screenshot
Dear Daniel,

I tried with a sample pivot table and am able to get the network days between two dates.

I used the below formula:
=NETWORKDAYS(MIN(A4:A13),MAX(A4:A13)) (here, A4:A13 are the ranges containing dates in the pivot table.

Please see the attached image for the table sample, formula used and the result received.

Is this what you were looking for?

Gulshan.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### GULSHAN PURSWANI

##### Expertise

I can answer questions related to the following topics: 1. MS Excel - Creating and Linking Formulae, Running Pivot Tables, Vlookup etc. 2. Macros / VBA - Creating Macros to do specific jobs. Importing / Exporting / Validating Data in excel through Macros.

##### Experience

I've been working on excel for over 10 years and on VBA macros for over 3 years now.

Education/Credentials
Bachelor of Commerce, Chartered Accountant from The Institute of Chartered Accountants of India