Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 516
Default Formaulating in Execel

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Formaulating in Execel

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Formaulating in Execel

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 252
Default Formaulating in Execel

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Formaulating in Execel

=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
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
Execel Macro subbu Excel Discussion (Misc queries) 2 April 27th 07 11:17 AM
Execel Macro subbu Excel Discussion (Misc queries) 1 April 24th 07 11:30 AM
Execel trial MotorTSgt Excel Discussion (Misc queries) 3 February 18th 07 05:54 AM
what is execel augustine Excel Discussion (Misc queries) 5 October 16th 06 07:44 PM
Execel Question sxyslim25 Excel Worksheet Functions 1 June 15th 05 04:28 PM


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"