Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JRG JRG is offline
Junior Member
 
Posts: 2
Default Use excel to calculate an expiration date

I'd like to create a formula in Excel that will calculate my products expiration date. Obviously, I'll know the manufacturing date that can be a calendar date in the form of : dd/mm/yy or julian date. The julian date would be 2310 w/ 2 representing the last digit of the year(2012) and 310 representing 11/5/12. My expiration date calculation will be either adding 330 or 150 to the calendar date or julian date. Help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default Use excel to calculate an expiration date

On Mon, 5 Nov 2012 21:52:59 +0000, JRG wrote:


I'd like to create a formula in Excel that will calculate my products
expiration date. Obviously, I'll know the manufacturing date that can be
a calendar date in the form of : dd/mm/yy or julian date. The julian
date would be 2310 w/ 2 representing the last digit of the year(2012)
and 310 representing 11/5/12. My expiration date calculation will be
either adding 330 or 150 to the calendar date or julian date. Help!


=IF(A1DATE(INT(YEAR(TODAY())/10)*10,1,0),
A1,DATE(INT(YEAR(TODAY())/10)*10+
INT(A1/1000),1,MOD(A1,2000)))+330

Change the 330 to your days to expiration, or replace with a cell reference.
Note that the formula is "keyed" to the current decade. If you want to specify a decade that is not current, replace TODAY() with a date in the decade of interest.
  #3   Report Post  
JRG JRG is offline
Junior Member
 
Posts: 2
Default

Quote:
Originally Posted by Ron Rosenfeld[_2_] View Post
On Mon, 5 Nov 2012 21:52:59 +0000, JRG wrote:


I'd like to create a formula in Excel that will calculate my products
expiration date. Obviously, I'll know the manufacturing date that can be
a calendar date in the form of : dd/mm/yy or julian date. The julian
date would be 2310 w/ 2 representing the last digit of the year(2012)
and 310 representing 11/5/12. My expiration date calculation will be
either adding 330 or 150 to the calendar date or julian date. Help!


=IF(A1DATE(INT(YEAR(TODAY())/10)*10,1,0),
A1,DATE(INT(YEAR(TODAY())/10)*10+
INT(A1/1000),1,MOD(A1,2000)))+330

Change the 330 to your days to expiration, or replace with a cell reference.
Note that the formula is "keyed" to the current decade. If you want to specify a decade that is not current, replace TODAY() with a date in the decade of interest.
T/Y for your help Ron. I'll give it a whirl.
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
Calculat an expiration date old coach Excel Worksheet Functions 0 February 23rd 09 03:55 AM
Dealing with date formats on expiration date bliten_bsas Excel Programming 1 October 4th 07 08:47 PM
Conditional Format for a date 1 month before Expiration in Excel 2 JonMAd Excel Worksheet Functions 2 August 28th 07 05:14 AM
How do I create an alert of expiration date in Excel? kachnycz Excel Discussion (Misc queries) 1 August 4th 05 08:22 PM
Code For Expiration Date Juan[_3_] Excel Programming 2 October 25th 03 09:15 AM


All times are GMT +1. The time now is 09:27 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"