Using a date formula!
I am using the formula:
=MIN(INT((TODAY()-D-10)/365)+1,4) to calulate from todays date to a past date and return the number years past with a max of 4 years. The problem: when I formulate the worksheet I will get "4" in the cell because it will calculate from today to 1-1-1900, how can I formulate a cell and get a default value of "0" or blank until I enter a date to which I want a calculation? I want to formulate the entire sheet and have it only calculate when I enter a date? |
Using a date formula!
On Nov 19, 1:11 pm, Matt wrote:
I am using the formula: =MIN(INT((TODAY()-D-10)/365)+1,4) to calulate from todays date to a past date and return the number years past with a max of 4 years. The problem: when I formulate the worksheet I will get "4" in the cell because it will calculate from today to 1-1-1900, how can I formulate a cell and get a default value of "0" or blank until I enter a date to which I want a calculation? I want to formulate the entire sheet and have it only calculate when I enter a date? Maybe not the most efficient, but you could use an if then statement..such as 100 or 1/1/1900 date. |
Using a date formula!
=IF(cell_with_date="",0,MIN(DATEDIF(cell_with_date ,TODAY(),"y"),4))
-- Regards, Peo Sjoblom "Matt" wrote in message ... I am using the formula: =MIN(INT((TODAY()-D-10)/365)+1,4) to calulate from todays date to a past date and return the number years past with a max of 4 years. The problem: when I formulate the worksheet I will get "4" in the cell because it will calculate from today to 1-1-1900, how can I formulate a cell and get a default value of "0" or blank until I enter a date to which I want a calculation? I want to formulate the entire sheet and have it only calculate when I enter a date? |
All times are GMT +1. The time now is 08:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com