Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Below is my C# code for excel Networkdays formula.

C#
rng = excelWorksheet.get_Range("M1", "M44").EntireColumn;
rng.Formula = "=NETWORKDAYS(K5,L5)";


In my output result is displaying on the cell M5.I need to display it also the 5th row.But the formula applied on it is NETWORKDAYS(K9,L9).next row M6,and the formula is NETWORKDAYS(K10,L10)...

Please correct me where i am going wrong.

Thanks
Posted

1 solution

rng.Formula = "=NETWORKDAYS(K1,L1,0)";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900