PDA

View Full Version : Solved: If statment to refer to a blank cell



almouchie
02-01-2006, 03:22 AM
IT may be a little stupid the question
but forgive me before hand

I have an if statement that shoud refer to a cell
if its blank G (date format) & H which id the bill number (format general)are blank
then subtract the date in F (purchase date) from today's date
if not (blank) then subtract the date in F from the bill date in G

IF(G2<0,Networksdays(F2,H2),NETWORKDAYS(F2,TODAY()))

using G> or <o doesnt do the trick for both cases

Thanks in advance

XLGibbs
02-01-2006, 05:46 AM
=IF(AND(G2="",H2=""),TODAY()-F2,G2-F2)

almouchie
02-01-2006, 06:24 AM
Thanks for replying :)
I tried

IF(AND(G2="",H2=""),TODAY()-F2,H2-F2)

it worked fine but I want the networkdays as in only the working days between the 2 dates
so i changed the formula to
IF(AND(G2="",H2=""),NETWORKDAYS(F2,TODAY()),NETWORKDAYS(F2,H2)
but it didn't work
what am i doing wrong

Bob Phillips
02-01-2006, 06:36 AM
= IF(AND(G2="",H2=""),NETWORKDAYS(F2,TODAY()),NETWORKDAYS(F2,H2))

should work. What do you get?

almouchie
02-01-2006, 06:53 AM
thanks for u both
it worked out fine
xlds, & gibbs :)
I guess these are not ur real names