-1

Need help with below code: getting error in line no 1 because of " quotation mark.

Range("L2").Formula = "=IF(D2="Demand Open",Networkdays(U2,Today())," - ")"
Set R = Range("B2", Range("B" & Rows.Count).End(xlUp))
Set R = Intersect(R.EntireRow, Range("L:L"))
R.FillDown
Range("L:L").Value = Range("L:L").Value
0m3r
  • 12,286
  • 15
  • 35
  • 71
  • 1
    Asked about a million times already. :) Double up the quotes in the formula: `"=IF(D2=""Demand Open"",Networkdays(U2,Today()),"" - "")"` – Rory Oct 17 '19 at 07:30

1 Answers1

1

Should be double ""

Range("L2").Formula = "=IF(D2=""Demand Open"",Networkdays(U2,Today()),"" - "")"
0m3r
  • 12,286
  • 15
  • 35
  • 71