VBA IfCounfit

  • Thread starter Thread starter ik
  • Start date Start date
I

ik

ActiveCell.FormulaR1C1 =
"=IF((COUNTIF(lista!E:E,0))=0;"";(COUNTIF(lista!E:E,0))))"

What is wrong with this part of code?

Tnx

Ivan
 
Hi Ivan
some things:
- you're using FormulaR1C1 but are not giving a formula text in this
notation
- to many brackets
- mixes separators (comas and semicolons mixed)
Returning "" in the middle of the IF clause instead of """"

Try
ActiveCell.Formula
="=IF(COUNTIF('lista'!E:E,0)=0,"""",COUNTIF('lista!E:E,0))"
 
Hi Ivan
some things:
- you're using FormulaR1C1 but are not giving a formula text in this
notation
- to many brackets
- mixes separators (comas and semicolons mixed)
Returning "" in the middle of the IF clause instead of """"

Try
ActiveCell.Formula
="=IF(COUNTIF('lista'!E:E,0)=0,"""",COUNTIF('lista!E:E,0))"

THANKS!!!!
 
Back
Top