Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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
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
How do you change a NULL value to a Zero when using =MID function? Derek Excel Discussion (Misc queries) 6 July 28th 06 12:09 AM
Can a function return a Null (blank ) value? Maybe a custom functi colin_e Excel Worksheet Functions 2 March 16th 06 02:36 PM
cell value based on null/not null in another cell spence Excel Worksheet Functions 1 February 18th 06 11:49 PM
How do I set a result of an "if" function to NULL; not 0 or ""? mbrockhaus Excel Worksheet Functions 5 May 16th 05 06:59 PM
Skipping Blank Or Null Cells In a Lookup Function Bill Johnson Excel Worksheet Functions 8 December 24th 04 01:06 AM


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

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

About Us

"It's about Microsoft Excel"