Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Can some one help me with the following formula?
I need to create a IF formula that will start with the current date "=TODAY" and count backwards appling a different numeric number for each year. ie. from today back 365 days=1; from 366 to 730=2; from 730 to 1095=3; from 1095 on =4. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am not sure I understand, where are the dates you are comparing TODAY()
to? Also note that a leap year has 366 days If the day you are testing is in A1 =VLOOKUP(TODAY()-A1,{0,1;366,2;731,3;1096,4},2) or maybe =IF(OR(A1="",A1=TODAY()),"",VLOOKUP(TODAY()-A1,{0,1;366,2;731,3;1096,4},2)) to dodge blanks and dates that are today or in the future "Matt" wrote in message ... Can some one help me with the following formula? I need to create a IF formula that will start with the current date "=TODAY" and count backwards appling a different numeric number for each year. ie. from today back 365 days=1; from 366 to 730=2; from 730 to 1095=3; from 1095 on =4. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Do you want to account for Leap Years??
-- Gary''s Student - gsnu200755 "Matt" wrote: Can some one help me with the following formula? I need to create a IF formula that will start with the current date "=TODAY" and count backwards appling a different numeric number for each year. ie. from today back 365 days=1; from 366 to 730=2; from 730 to 1095=3; from 1095 on =4. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am not sure what you are asking but look in the help for the function DATEDIF
example: A1:8/23/1980 A2:=TODAY() A3:=DATEDIF(A1,A2,"Y") A3 results in 27, the number of complete years seperating 11/8/2007 and 8/23/1980. If A1 contained 11/23/1980 the result would be 26. If I haven't answered your question, and you can't use DATEDIF to do what you want, please rephrase your question and use an example to show the results you want. "Matt" wrote: Can some one help me with the following formula? I need to create a IF formula that will start with the current date "=TODAY" and count backwards appling a different numeric number for each year. ie. from today back 365 days=1; from 366 to 730=2; from 730 to 1095=3; from 1095 on =4. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=INT((TODAY()-A2)/365)+1
It's not clear whether you want to include today and/or the date in question in your count of 365, so you may want to experiment with a +1 or -1 between the A2 and the immediately following closing parenthesis. -- David Biddulph "Matt" wrote in message ... Can some one help me with the following formula? I need to create a IF formula that will start with the current date "=TODAY" and count backwards appling a different numeric number for each year. ie. from today back 365 days=1; from 366 to 730=2; from 730 to 1095=3; from 1095 on =4. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Execel Macro | Excel Discussion (Misc queries) | |||
Execel Macro | Excel Discussion (Misc queries) | |||
Execel trial | Excel Discussion (Misc queries) | |||
what is execel | Excel Discussion (Misc queries) | |||
Execel Question | Excel Worksheet Functions |