View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom[_2_] Peo Sjoblom[_2_] is offline
external usenet poster
 
Posts: 964
Default If statement containing today formula

Same here at times

--


Regards,


Peo Sjoblom

"Sean Timmons" wrote in message
...
Good point. Force of habit on my part...

"Peo Sjoblom" wrote:

If it has #N/A it might be better to use ISNA since another error type
might
be of importance

--


Regards,


Peo Sjoblom

"Sean Timmons" wrote in message
...
K2 doesn't technically have a value of "#N/A". So, instead, do..

=IF(iserror(K2),(NETWORKDAYS(E2,TODAY())-1),(NETWORKDAYS(E2,L2)-1))

"Christi" wrote:

Hello.

I have a spreadsheet with two sets of information that I am trying to
compare. In columns D thru I, I have the kit information. In columns K
thru
L, I have the order information if it is available. I pulled in the
order
information with vlkp, copied and paste special text, so there isn't
an
embedded formula in the data I am comparing.

The essence of what I am trying to find is the number of days that
passed
before the kit was ordered. To do this, my first formula was:
=NETWORKDAYS(E2,L2)-1
E2 being the date the kit was created and L2 being the date the kit
was
ordered. This worked well for the kits that had been ordered, but for
the
ones that hadn't (order# in K2 is #N/A), I want to subtract it from
today's
date that would be refreshed when the spreadsheet openned.

The next formula I tried was:
=IF(K2="#N/A",(NETWORKDAYS(E2,TODAY())-1),(NETWORKDAYS(E2,L2)-1))
This statement works fine for the false, but true just returns a
result
of
#N/A. I also tried typing =TODAY() in a cell off on the side and
modifying
the formula to reference that cell, but the formula still returns #N/A
for
the number of days passed if there was no order information.

I'm sure the adjustment is minor or there might even be an easier
formula
to
use. If someone could please help, I would appreciate it.

Thanks,
Christi