Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dig Dig is offline
external usenet poster
 
Posts: 17
Default Understanding formula

What exactly does this formula do

=DATE(YEAR(O2)-1,1,1)

I am trying to get it to print 2008

Any help appreciated
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Understanding formula

hi
the date formula has 3 parts.
year, month and day in that order and is usually written...
=date(year(a1),month(a1),day(a1))
to evaulate a date in A2 but it can be written
=date(2008,7,3) which would be 7/3/08
the formula you posted...
=DATE(YEAR(O2)-1,1,1)
year(O2-1) subtracts 1 year form the date in O2 the puts month 1 and day1 so
if O2 contained today date the formula would read 1/1/2007
if you just want to print the year, use this
=year(O2)

regards
FSt1

"Dig" wrote:

What exactly does this formula do

=DATE(YEAR(O2)-1,1,1)

I am trying to get it to print 2008

Any help appreciated
Thanks

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
NOT UNDERSTANDING THE FORMULA PAPABEAR2252 Excel Worksheet Functions 1 September 12th 05 05:37 PM
NOT UNDERSTANDING THE FORMULA PAPABEAR2252 Excel Worksheet Functions 3 September 10th 05 10:45 PM
Understanding a formula Jordan Excel Worksheet Functions 1 May 27th 05 05:42 AM
Understanding a formula Jordan Excel Worksheet Functions 6 May 26th 05 09:14 PM
Understanding this formula Sal Excel Worksheet Functions 4 March 26th 05 06:32 PM


All times are GMT +1. The time now is 10:28 PM.

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"