Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions


Reply
 
Thread Tools Display Modes
  #1  
Old 05-30-2008, 12:27 PM
Wendy Crewson Wendy Crewson is offline
Member
SOA AAA
 
Join Date: Jun 2005
Location: Holding on with white knuckles
Favorite beer: Mickey's Big Mouth
Posts: 346
Default Excel question involving dates

Happy Friday. I am having trouble recalling how I used to have Excel calculate the date. The fact pattern is ----> I put the "Now" function in one cell and then in another cell, I grabbed the month and year portion from the results of the Now function. All I want to do is display, for example, June 2008, in a designated cell automatically in real time. I would also like to be able to subtract 1 from the month if I am working on last month's data. Any thoughts? Thanks.
__________________
Liz Lemon's Mom on why she didn't pursue marriage to Buzz Aldrin: "It wasn't that simple, Liz. I had just graduated from secretarial school, and I got a job at Sterling Cooper."
Reply With Quote
  #2  
Old 05-30-2008, 12:33 PM
schleprock's Avatar
schleprock schleprock is offline
Member
CAS
 
Join Date: May 2002
Favorite beer: Stone IPA
Posts: 1,136
Default

Why not just format the NOW() cell to show "June 2008"?

There's a handy function called EDATE() that adds or subtracts months from the date in a target cell, but I think you need to add in the "Analysis ToolPak" to get it.
Reply With Quote
  #3  
Old 05-30-2008, 12:44 PM
Wendy Crewson Wendy Crewson is offline
Member
SOA AAA
 
Join Date: Jun 2005
Location: Holding on with white knuckles
Favorite beer: Mickey's Big Mouth
Posts: 346
Default About formatting

Schlep -- I tried experimenting with the formats to create the June 2008 version, but none of the available ones work. Did you have a specific one in mind or were you thinking that it could be programmed?
__________________
Liz Lemon's Mom on why she didn't pursue marriage to Buzz Aldrin: "It wasn't that simple, Liz. I had just graduated from secretarial school, and I got a job at Sterling Cooper."
Reply With Quote
  #4  
Old 05-30-2008, 12:46 PM
Former Actuarial's Avatar
Former Actuarial Former Actuarial is offline
Member
 
Join Date: Oct 2007
Posts: 2,891
Blog Entries: 5
Default

use now() and change the cell format to a custom number of mmmm yyyy. (after you enter the function, click format/cells/number/custom and type in "mmmm yyyy" without the quotes)

for subtracting a month, use "=DATE(YEAR(NOW()),MONTH(NOW())-1,DAY(NOW()))" without the quotes
__________________
When I meet you in person, shots on me! Do you bite?

We are a bunch of high roller players who like to play high roller games - Hardinda
Reply With Quote
  #5  
Old 05-30-2008, 12:49 PM
thing's Avatar
thing thing is offline
Member
 
Join Date: Sep 2001
Location: Oregon
Posts: 7,767
Default

=TEXT(TODAY(),"MMMM YYYY")
=TEXT(EDATE(TODAY(),-1),"MMMM YYYY")
__________________
Visit thing's web empire:
Printable Sudoku Puzzles & 12 by 12 Sudoku & 6 by 6 Sudoku & Nurikabe
Reply With Quote
  #6  
Old 05-30-2008, 01:18 PM
Old Timer's Avatar
Old Timer Old Timer is offline
Member
SOA AAA
 
Join Date: Sep 2001
Location: The Great East
Posts: 1,557
Default

Quote:
Originally Posted by Former Actuarial View Post
use now() and change the cell format to a custom number of mmmm yyyy. (after you enter the function, click format/cells/number/custom and type in "mmmm yyyy" without the quotes)

for subtracting a month, use "=DATE(YEAR(NOW()),MONTH(NOW())-1,DAY(NOW()))" without the quotes
If you use this approach, watch out for the 31st of a month and some of February. EDATE is the preferred solution and yes, you do need to use the Analysis ToolPak add-in. Also, I'd recommend the custom formatting route as well so you don't need an extra formula.
__________________
Life is chaos personified.
Reply With Quote
  #7  
Old 05-30-2008, 01:20 PM
JMO's Avatar
JMO JMO is offline
Carol Marler
SOA AAA
 
Join Date: Sep 2001
Location: Back home again in Indiana
Studying for CPD
Posts: 29,628
Default

Nice. I never knew about EDATE.
__________________
Carol Marler, FSA, MAAA, A Dedicated Actuary
Just My Opinion (Although this statement is my opinion, and I am an actuary, it's still not a statement of actuarial opinion, and you really shouldn't rely on it.)

Updated quotes Apr 4:
Spoiler:
Quote:
Originally Posted by Arthur Kade View Post
Actuaries (as a general rule) are uniquely UNqualified to work with derivatives.
Quote:
Originally Posted by Dr T Non-Fan View Post
learning what the data are, what they mean, why they are plural, etc.
Quote:
Originally Posted by SamTheEagle View Post
StompStomp kept saying "Happy Day!" rather than Happy Birthday. It was cute.
Quote:
Originally Posted by Buck View Post
Machines do not make human-errors but make machine-errors; humans do not make machine-errors but make human-errors ... even when the technology is there, it'd be a tough call as to which makes driving safer.
Quote:
Originally Posted by Klaymen View Post
Life is a bunch of IF statements
Reply With Quote
  #8  
Old 05-30-2008, 01:47 PM
GadgetGeek's Avatar
GadgetGeek GadgetGeek is offline
Note Contributor
SOA AAA
 
Join Date: Sep 2001
Location: I'm here, where are you?
Studying for a way to escape
College: Illinois College ('87)
Favorite beer: Stag
Posts: 10,512
Default

Quote:
Originally Posted by JMO View Post
Nice. I forgot I knew about EDATE.
IFYP
__________________
Some people are like clouds. When they disappear, it's a brighter day.
Reply With Quote
  #9  
Old 05-30-2008, 02:06 PM
JMO's Avatar
JMO JMO is offline
Carol Marler
SOA AAA
 
Join Date: Sep 2001
Location: Back home again in Indiana
Studying for CPD
Posts: 29,628
Default

Quote:
Originally Posted by GadgetGeek View Post
IFYP

You mean it was in Lotus 1-2-3? (I really did know everything in the version available back BI before internets)
__________________
Carol Marler, FSA, MAAA, A Dedicated Actuary
Just My Opinion (Although this statement is my opinion, and I am an actuary, it's still not a statement of actuarial opinion, and you really shouldn't rely on it.)

Updated quotes Apr 4:
Spoiler:
Quote:
Originally Posted by Arthur Kade View Post
Actuaries (as a general rule) are uniquely UNqualified to work with derivatives.
Quote:
Originally Posted by Dr T Non-Fan View Post
learning what the data are, what they mean, why they are plural, etc.
Quote:
Originally Posted by SamTheEagle View Post
StompStomp kept saying "Happy Day!" rather than Happy Birthday. It was cute.
Quote:
Originally Posted by Buck View Post
Machines do not make human-errors but make machine-errors; humans do not make machine-errors but make human-errors ... even when the technology is there, it'd be a tough call as to which makes driving safer.
Quote:
Originally Posted by Klaymen View Post
Life is a bunch of IF statements
Reply With Quote
  #10  
Old 05-30-2008, 02:53 PM
Wendy Crewson Wendy Crewson is offline
Member
SOA AAA
 
Join Date: Jun 2005
Location: Holding on with white knuckles
Favorite beer: Mickey's Big Mouth
Posts: 346
Default Thanks so much

It's nice to have you guys as a resource. Have a great weekend.
__________________
Liz Lemon's Mom on why she didn't pursue marriage to Buzz Aldrin: "It wasn't that simple, Liz. I had just graduated from secretarial school, and I got a job at Sterling Cooper."
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 04:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.17876 seconds with 9 queries