View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Why does this COUNTIF code not work

Hi,

You need to double-up on internal qiotes, try this

Range("L2").Formula = "=COUNTIF(E2:E25,""Missed code date"")"

Mike

"ChipButtyMan" wrote:

Hi,
I get an Expected; end of statement error with this code. The
word 'Missed' is highlighted as the point of the error.



Private Sub CommandButton8_Click()

Range ("L2").Formula = "=COUNTIF(E2:E25,"Missed code date")"

End Sub