ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statements (https://www.excelbanter.com/excel-worksheet-functions/212799-if-statements.html)

DDD

If statements
 
NOT REALLY SURE HOW TO EXPLAIN IT, SO I THOUGHT IT MIGHT BE EASIER IF YOU
TYPE THIS IN A BLANK SPREAD SHEET

cell A1 type in - 08-Dec
cell B2 type in - 7
cell C1 type in - =A1+B1 (the answer is 15-Dec)
cell D1 type in - =IF(A1=0,"",C1) (the answer is 15-Dec)
cell E1 type in - =IF(D1=0,"",D1-TODAY())

(todays date is 7/12/2008 & the answer in E1 is 08-Dec)



If i were to delete the contents of A1, then cells D1 & E1 should turn blank.

When i did it D1 becomes blank but E1 says #VALUE! (& has a green triangleat
the top right corner)

can any tell me how to make cell E1 blank

i tried clicking the green triangle then the yellow box with ! inside, i
tried most of the options that may help me but i could not understand any of
them

If this helps - i am using Excel 2007





MyVeryOwnSelf[_2_]

If statements
 
cell A1 type in - 08-Dec
cell B2 type in - 7
cell C1 type in - =A1+B1 (the answer is 15-Dec)
cell D1 type in - =IF(A1=0,"",C1) (the answer is 15-Dec)
cell E1 type in - =IF(D1=0,"",D1-TODAY())

(todays date is 7/12/2008 & the answer in E1 is 08-Dec)

If i were to delete the contents of A1, then cells D1 & E1 should
turn blank.

When i did it D1 becomes blank but E1 says #VALUE! (& has a green
triangleat the top right corner)

can any tell me how to make cell E1 blank


One way is to use this in E1:
=IF(D1="","",D1-TODAY())

Incidentally, I'd suggest formatting E1 as a number. It's the number of
days between the two dates, "7 days after A1" and TODAY(). I get 8 days.

(I have Excel 2003.)


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com