A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF Formula



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2007, 04:03 PM posted to microsoft.public.excel.worksheet.functions
Matt
external usenet poster
 
Posts: 1,077
Default IF Formula

Take 2..

I am trying to get a formula that will assign a numeric value for a each
year past "TODAY". The TODAY date needs to change every day.

Today to 365days=1; 366 days to 730=2; 730 to 1095=3; 1095+ =4

  #2  
Old November 8th, 2007, 04:19 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
 
Posts: 6,167
Default IF Formula

More info would have been helpful. Is this what you want.
=INT((TODAY()-H20)/365.25)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Matt" wrote in message
...
Take 2..

I am trying to get a formula that will assign a numeric value for a each
year past "TODAY". The TODAY date needs to change every day.

Today to 365days=1; 366 days to 730=2; 730 to 1095=3; 1095+ =4


  #3  
Old November 8th, 2007, 04:24 PM posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
external usenet poster
 
Posts: 2,468
Default IF Formula

One way:

If you're not concerned about leap years:

A1: date

B1: =INT((A1-TODAY()-1)/365)+1

or if your max is really 4:

B1: =MIN(4, INT((A1-TODAY()-1)/365)+1)

If you want to take leap years into account:

B1: =DATEDIF(TODAY(),A1-1,"y")+1

In article ,
Matt wrote:

I am trying to get a formula that will assign a numeric value for a each
year past "TODAY". The TODAY date needs to change every day.

Today to 365days=1; 366 days to 730=2; 730 to 1095=3; 1095+ =4

 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:28 AM.


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