I am struggling with some strange problem when working with excel vba which im using to paste formula inside some cell.
So I've got a VBA code that loops through some worksheets in my workbook and based on it values it is pasting formulas to cell. First of them is formula Like =COUNTA(Station_Tabular!D6:D60)
where station_tabular is sheetName and with this formula everything is fine. But when i try to paste =COUNTIF(Station_Tabular!D6:D60;Introduction!C43)
i'm getting Application-defined or object defined error and what is interesting when i inject the formula using vba without =
sign(So, it is normal text) and later, manually add the =
sign at the beginning, the formula is working good.
So does somebody know how can i deal with this kind of problem? Honestly it's driving me crazy, because i tried many workarounds, like e.g later add in vba code the equal sign but every time i'm getting the same error. It is very important to me to find a way to prepare this formula using vba only.