Forum Discussion

JoeCavasin's avatar
JoeCavasin
Brass Contributor
Jan 18, 2025
Solved

Adding COUNTIF formula to cell by VBA code

Morning all, need some assistance.  Attempting to insert a new formula by VBA with an already working Macro.  All the other references unhighlighted below work perfectly, but I am missing something w...
  • HansVogelaar's avatar
    Jan 18, 2025

    Quotes inside a quoted string must be doubled:

    .Range("AH11").Formula = "=COUNTIF($B11:$AF11, ""B"")"

Resources