Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF function and null cell value
I'm looking for some guidance on a problem I am having with the IF function
on a spreadsheet. Perhaps someone out there can assist. Within this spreadsheet, I need to compare two dates: one date is the current date (using the worksheet function =TODAY() ). The other date is manually entered as an expiration date. The current worksheet function I used to compare both dates is =IF(($F$1+30)=F3,"Remove","") where cell F1 is the result of the worksheet function =TODAY () and F3 represents the expiration date field. In this instance, we are comparing both dates and if the sum of TODAY's date + 30 days is greater than or equal to the expiration date, then the field is populated with the term Remove. If this condition is not met, then the field is populated with nothing. The latter is preferential. So the problem with the way the IF function is written is I need to have a value in the cell to compare to. If I leave the expiration date field blank (no value), then the result of the IF worksheet function will be "Remove". My question is this.... is there a way to modify the IF statement so that when the expiration date field is left blank, the IF worksheet function will not return the term "Remove"? Any help or guidance would be greatly appreciated. As it stands now, I have populated the expiration date field with a date far off in the future to prevent this issue from occuring. Much obliged in advance. D Allen |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF function and null cell value
One way:
=IF(AND($F$1+30=F3, F3<""),"Remove","") In article , "DAllen" wrote: I'm looking for some guidance on a problem I am having with the IF function on a spreadsheet. Perhaps someone out there can assist. Within this spreadsheet, I need to compare two dates: one date is the current date (using the worksheet function =TODAY() ). The other date is manually entered as an expiration date. The current worksheet function I used to compare both dates is =IF(($F$1+30)=F3,"Remove","") where cell F1 is the result of the worksheet function =TODAY () and F3 represents the expiration date field. In this instance, we are comparing both dates and if the sum of TODAY's date + 30 days is greater than or equal to the expiration date, then the field is populated with the term Remove. If this condition is not met, then the field is populated with nothing. The latter is preferential. So the problem with the way the IF function is written is I need to have a value in the cell to compare to. If I leave the expiration date field blank (no value), then the result of the IF worksheet function will be "Remove". My question is this.... is there a way to modify the IF statement so that when the expiration date field is left blank, the IF worksheet function will not return the term "Remove"? Any help or guidance would be greatly appreciated. As it stands now, I have populated the expiration date field with a date far off in the future to prevent this issue from occuring. Much obliged in advance. D Allen |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF function and null cell value
That did the trick. Thank you very much.
DAllen "JE McGimpsey" wrote in message ... One way: =IF(AND($F$1+30=F3, F3<""),"Remove","") In article , "DAllen" wrote: I'm looking for some guidance on a problem I am having with the IF function on a spreadsheet. Perhaps someone out there can assist. Within this spreadsheet, I need to compare two dates: one date is the current date (using the worksheet function =TODAY() ). The other date is manually entered as an expiration date. The current worksheet function I used to compare both dates is =IF(($F$1+30)=F3,"Remove","") where cell F1 is the result of the worksheet function =TODAY () and F3 represents the expiration date field. In this instance, we are comparing both dates and if the sum of TODAY's date + 30 days is greater than or equal to the expiration date, then the field is populated with the term Remove. If this condition is not met, then the field is populated with nothing. The latter is preferential. So the problem with the way the IF function is written is I need to have a value in the cell to compare to. If I leave the expiration date field blank (no value), then the result of the IF worksheet function will be "Remove". My question is this.... is there a way to modify the IF statement so that when the expiration date field is left blank, the IF worksheet function will not return the term "Remove"? Any help or guidance would be greatly appreciated. As it stands now, I have populated the expiration date field with a date far off in the future to prevent this issue from occuring. Much obliged in advance. D Allen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you change a NULL value to a Zero when using =MID function? | Excel Discussion (Misc queries) | |||
Can a function return a Null (blank ) value? Maybe a custom functi | Excel Worksheet Functions | |||
cell value based on null/not null in another cell | Excel Worksheet Functions | |||
How do I set a result of an "if" function to NULL; not 0 or ""? | Excel Worksheet Functions | |||
Skipping Blank Or Null Cells In a Lookup Function | Excel Worksheet Functions |