View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
christi christi is offline
external usenet poster
 
Posts: 30
Default If statement containing today formula

Thank you both for your assistance. Both suggestions worked.

Since I copied and pasted the values of my vlkp, and the value per se was
#n/a, why would the actual value still only be na in the formula? Just a
little curious.

"Peo Sjoblom" wrote:

Use

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

--


Regards,


Peo Sjoblom

"Christi" wrote in message
...
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