VBA is generally US-centric - as a result you would use US based delimiters, eg:

Cells(5,i * 6 + 2) = "=IF(AND($F$3>K5,$F$3<K6),M5,0)"
Obviously this can be confusing if you're unfamiliar with the requisite syntax so MS also make available the FormulaLocal property

Cells(5,i * 6 + 2).FormulaLocal = "=IF(AND($F$3>K5;$F$3<K6);M5;0)"
this way you can use your own native syntax

On an aside please always encase Code within CODE tags - even one liners.