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 take 3



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

Sorry for not explaining the problem better.

With the formula =INT((TODAY()-D10)/365.25);
I get a value of "0" for the first year past todays date, and I can only
have a max value of 4.
  #2  
Old November 8th, 2007, 07:42 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default IF Formula take 3

So, what is your problem? Do you want 1 to be returned for the first
year? If so, add 1 to your formula. If you want to ensure that a
number larger than 4 cannot be returned if D10 is many years in the
past, then use this:

=MIN(INT((TODAY()-D10)/365.25)+1,4)

Hope this helps.

Pete


On Nov 8, 7:35 pm, Matt wrote:
Sorry for not explaining the problem better.

With the formula =INT((TODAY()-D10)/365.25);
I get a value of "0" for the first year past todays date, and I can only
have a max value of 4.



  #3  
Old November 8th, 2007, 07:56 PM posted to microsoft.public.excel.worksheet.functions
Niek Otten
external usenet poster
 
Posts: 2,533
Default IF Formula take 3

Hope this helps

And if it doesn't, please post again *In this thread*, don't start another one

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Pete_UK" wrote in message ups.com...
| So, what is your problem? Do you want 1 to be returned for the first
| year? If so, add 1 to your formula. If you want to ensure that a
| number larger than 4 cannot be returned if D10 is many years in the
| past, then use this:
|
| =MIN(INT((TODAY()-D10)/365.25)+1,4)
|
| Hope this helps.
|
| Pete
|
|
| On Nov 8, 7:35 pm, Matt wrote:
| Sorry for not explaining the problem better.
|
| With the formula =INT((TODAY()-D10)/365.25);
| I get a value of "0" for the first year past todays date, and I can only
| have a max value of 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:15 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.