Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default create calculated field for age in pivot tables

I need to create a calculated field for Age from the birth date within a
Pivot Table (Excel Office 2007). I can not create age in the data set
because it is pulling directly from a data source.

I tried just using the formula =INT((TODAY()- Birthday)/365.25) but received
an error.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 376
Default create calculated field for age in pivot tables

Hi

That won't work because you cannot use NOW() or TODAY() in PT Calculated
fields or items.

I think the only way you can do it (approximately) if you cannot add a
field to your source data, would be to make a calculated field with the
formula
=2010-Year(Birthday)

--
Regards
Roger Govier

pderbie wrote:
I need to create a calculated field for Age from the birth date within a
Pivot Table (Excel Office 2007). I can not create age in the data set
because it is pulling directly from a data source.

I tried just using the formula =INT((TODAY()- Birthday)/365.25) but received
an error.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eva Eva is offline
external usenet poster
 
Posts: 197
Default create calculated field for age in pivot tables

Try this
DATEDIF(birthdate,TODAY(),"y")

--
Please click "yes" if this post helped you!

Greatly appreciated

Eva


"pderbie" wrote:

I need to create a calculated field for Age from the birth date within a
Pivot Table (Excel Office 2007). I can not create age in the data set
because it is pulling directly from a data source.

I tried just using the formula =INT((TODAY()- Birthday)/365.25) but received
an error.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default create calculated field for age in pivot tables

Excel 2007 PivotTable
As Roger noted, no TODAY() allowed in PT.
A macro work-around can give you a bit
more accuracy:
http://c0718892.cdn.cloudfiles.racks...03_03_10a.xlsm
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 376
Default create calculated field for age in pivot tables

Very nice solution, Herbert!
--
Regards
Roger Govier

Herbert Seidenberg wrote:
Excel 2007 PivotTable
As Roger noted, no TODAY() allowed in PT.
A macro work-around can give you a bit
more accuracy:
http://c0718892.cdn.cloudfiles.racks...03_03_10a.xlsm

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculated field in pivot tables nc Excel Discussion (Misc queries) 2 July 24th 08 02:08 PM
Pivot tables - Insert Calculated field nc Excel Discussion (Misc queries) 0 May 9th 06 09:35 AM
Calculated field in Pivot Tables JILL Excel Discussion (Misc queries) 2 April 28th 06 03:54 PM
Pivot Tables - How do I add Functions as a Calculated Field? ColinS via OfficeKB.com Excel Discussion (Misc queries) 0 April 6th 06 10:59 AM
calculated field/item in pivot tables Liny Excel Discussion (Misc queries) 1 June 2nd 05 01:00 AM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"