if is null

M

Marge

I know how to do this in Access, but I'm stumped with Excel.

I have columns for project start date, project complete date and days in
process. If the project complete date is null, I want a return of
NOW()-project start date.

A B C
project start project completed days in process
7/1/2009 8/1/2009 B3-A3

Can this be done in Excel?
 
V

Victor Delta

Marge said:
I know how to do this in Access, but I'm stumped with Excel.

I have columns for project start date, project complete date and days in
process. If the project complete date is null, I want a return of
NOW()-project start date.

A B C
project start project completed days in process
7/1/2009 8/1/2009 B3-A3

Can this be done in Excel?

ISBLANK is what you need!

I suggest you put this in C3... =IF(ISBLANK(B3),TODAY()-A3,B3-A3).

HTH

V
 
R

Red

Hi Marge.

Yes this can be done; a number of different ways actually. You can use an IF
statement in cell C3 that says something like this:

=IF(B4=0,(Today()-A4),B4-A4) then drag down for as many rows as you need.

Hope this helps.
 
S

Shane Devenshire

Hi,

Actually 0 isn't null or more correctly blank. Although a blank cell may
evaluate to 0 as cell with 0 is not empty.

So although it may make no difference to the user I would use

=IF(B4="",TODAY(),B4)-A4

which also includes a few other modifications.

Marge - there is really no equivalent to a database definition of NULL in
Excel but blank will suffice and as you can see we indicate a blank cell with
"" or you can use the function ISBLANK. NULL does occur in the spreadsheet
side of Excel as and error message for an intersect formula when there is no
intersect. #NULL!
 
T

Teethless mama

=IF(B3,B3,TODAY())-A3


Marge said:
I know how to do this in Access, but I'm stumped with Excel.

I have columns for project start date, project complete date and days in
process. If the project complete date is null, I want a return of
NOW()-project start date.

A B C
project start project completed days in process
7/1/2009 8/1/2009 B3-A3

Can this be done in Excel?
 
Top