Blank Date

N

NotGood@All

I have 2 date fields, B30 & C30 and a number field F30. I want to calculate
the Net Workdays between B30&C30 putting the answer in F30, but if C30 is
blank, I want F30 to be blank. I used this code in F30
“=IF(C30="","",NETWORKDAYS(C30-B30))†but I can’t get it to work. Would
someone please help me!
 
R

Ron Coderre

Sometimes Excel Help can be...helpful:
NETWORKDAYS(start_date,end_date,holidays)

Your formula doesn't use the correct function arguments:
=IF(C30="","",NETWORKDAYS(C30-B30))

If
C30 is the start_date
and
B30 is the end_date,

the formula should be:
=IF(C30="","",NETWORKDAYS(C30,B30))

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
T

Tyro

Did you put quotes around your formula? If so, remove them. Also, the
NETWORKDAYS format is NETWORKDAYS(StartDate,EndDate[,Holidays]) Your formula
has a "-" sign in it as in C30-B30. NETWORKDAYS wants a comma between C30
and B30 as in =NETWORKDAYS(C30,B30) If you are using a version of Excel
prior to Excel 2007, you need to have the Analysis Toolpak installed to use
the function NETWORKDAYS. You don't state what happens when you use the
formula. "can't get it to work" doesn't tell anybody anything.

Tyro
 
N

NotGood@All

Thank you all for helping me! The problem was the "-", should have been ","
--
NotGood@All


Tyro said:
Did you put quotes around your formula? If so, remove them. Also, the
NETWORKDAYS format is NETWORKDAYS(StartDate,EndDate[,Holidays]) Your formula
has a "-" sign in it as in C30-B30. NETWORKDAYS wants a comma between C30
and B30 as in =NETWORKDAYS(C30,B30) If you are using a version of Excel
prior to Excel 2007, you need to have the Analysis Toolpak installed to use
the function NETWORKDAYS. You don't state what happens when you use the
formula. "can't get it to work" doesn't tell anybody anything.

Tyro


NotGood@All said:
I have 2 date fields, B30 & C30 and a number field F30. I want to
calculate
the Net Workdays between B30&C30 putting the answer in F30, but if C30 is
blank, I want F30 to be blank. I used this code in F30
"=IF(C30="","",NETWORKDAYS(C30-B30))" but I can't get it to work. Would
someone please help me!
 

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