I have a rather complicated table of formulae which could be easily corrupted by manual manipulation (I'm aware of password protect but that is not my concern). I have set about rewriting all of the formulae in that table in Visual Basic.
Now in one particular column the formulae are of the format:
=IF(C$2<Glob_Data!L11+1,COUNTIF($A:$A,"<"&D5+1),"") and if there is no data present the cell reports "0".
COUNTIF($A:$A, "<" & D5+1) reports the value held in D5 plus 1.
Writing that under VBA I have:
Cells(5,6).formula="=IF(C$2<Glob_Data!L11+1,COUNTIF($A:$A, "<" & D5+1),"""")" and so the only difference in the formula is the quotes at the end of that under VBA. There is are no compilation errors report but when I execute that formula the cell holds the value FALSE, no formula is present. That is even so if Column A does hold values.
Clearly there is something wrong with my syntax. I'd appreciate some guidance to rectify that.
I don't see any point in offering that table as it would be too complicated to explain in writing what is going on.
Now in one particular column the formulae are of the format:
=IF(C$2<Glob_Data!L11+1,COUNTIF($A:$A,"<"&D5+1),"") and if there is no data present the cell reports "0".
COUNTIF($A:$A, "<" & D5+1) reports the value held in D5 plus 1.
Writing that under VBA I have:
Cells(5,6).formula="=IF(C$2<Glob_Data!L11+1,COUNTIF($A:$A, "<" & D5+1),"""")" and so the only difference in the formula is the quotes at the end of that under VBA. There is are no compilation errors report but when I execute that formula the cell holds the value FALSE, no formula is present. That is even so if Column A does hold values.
Clearly there is something wrong with my syntax. I'd appreciate some guidance to rectify that.
I don't see any point in offering that table as it would be too complicated to explain in writing what is going on.