Good evening colleagues,
I struggle with this piece of code, i cannot understand why i cant add the formulas into the cells with it. not a single line is working. Excel 2010/13. Any suggestion helps. Thanks in advance.
HTML Code:
Good evening colleagues,
I struggle with this piece of code, i cannot understand why i cant add the formulas into the cells with it. not a single line is working. Excel 2010/13. Any suggestion helps. Thanks in advance.
HTML Code:
![]()
Private Sub Workbook_Open() Sheets("Summary").cells(6,"A").Formula = "=COUNTIF($E:$E;" * ")-2" Sheets("Summary").cells(7,"A").Formula = "=COUNTIF(A8:A999999;">0")" Sheets("Summary").cells(8,"A").Formula = "=COUNTIF(B12:B999792;TRUE)" Sheets("Summary").cells(9,"A").Formula = "=COUNTIF(C12:C999792;TRUE)" End Sub
It didn't help...it is always giving error 13 or 1004...
![]()
sheets("summary").select Range("A6").Select ActiveCell.FormulaR1C1 = "=COUNTIF(C[4],"" * "")" Range("A7").Select ActiveCell.FormulaR1C1 = "=COUNTIF(R[1]C:R[99999]C,"">0"")"
Try:
![]()
Private Sub Workbook_Open() ' note Summary worksheet must exist With Sheets("Summary") .[A6].Formula = "=COUNTIF($E:$E,"" * "")-2" .[A7].Formula = "=COUNTIF(A8:A999999,"">0"")" .[A8].Formula = "=COUNTIF(B12:B999792,TRUE)" .[A10].Formula = "=COUNTIF(C12:C999792,TRUE)" End With End Sub
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks