none
Countif is not working with Activecell.Formula RRS feed

  • Question

  • Hi

    The following formula is not working with Countif

    ActiveCell.Formula = "=IF(COUNTIF(AD12," * RFT * ")=1,CEILING(AN12+l2rftf,l1p5rndup),IF(Z12<=16,CEILING(AN12+l2016f,l1p5rndup),IF(Z12=17,CEILING(AN12+l217f,l1p5rndup),IF(Z12=18,CEILING(AN12+l218f,l1p5rndup),IF(Z12=19,CEILING(AN12+l219f,l1p5rndup),IF(Z12>=20,CEILING(AN12+l220f,l1p5rndup),0))))))"

    When I run the macro, Active cell formula will  be empty

    Please help to fix it

    Thanks

    Pol


    polachan

    Tuesday, September 15, 2015 11:47 AM

Answers

  • Strings within a formula must be enclosed in double double quotes:

    ActiveCell.Formula = "=IF(COUNTIF(AD12,""*RFT*"")=1,CEILING(...


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Tuesday, September 15, 2015 1:34 PM