Workday

  • Thread starter native earthling
  • Start date
N

native earthling

I have two columns of dates; one for "initial input" and one for "work
started." I have a third column to show the difference of days between
dates. In this column I want it to remain blank until there is a date in
both of the previously mentioned columns. Right now I am getting a number in
the third column as soon as an "initial input" date is entered. How can I
prevent that from occurring?
 
B

Bernard Liengme

Let's say your formula is B1-A1. You want this to display nothing until there
values in both cells. Use this formula: =IF(COUNT(A1:B1)=2, B1-A1,"") where
"" are two double quotes with nothing inside them. Id the two cells are not
side-by-sise use something like =IF(COUNT(S4, V4)=2,V4-S4,"")
best wishes
 
N

native earthling

Bernard,

Thanks, but I already have, as an example, the formula =NETWORKDAYS(N9,P9)
to get the difference in days to appear. However, if only one date is filled
in, I get a number value that, apparently, interprets the date as a value.
For instance, in one row I have no date in column A and "31/08/2007" in
column B. Column C, that's supposed to show the difference in days between
the dates of columns A and B has the value "28090". How can I get it to
remain blank or at least show "0"?

Thanks for your help.
 
B

Bernd P

Hello,

=REPT(B1-A1,A1<>"")
if A1 is initial input. But maybe you would even prefer
=REPT(B1-A1,A1&B1<>"")

Beware: Output is a string. If you need it as number later on use it
with prefix -- (double unary minus). This is just one possible
approach amongst others NOT to mix strings and numbers within a cell.

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top