I am trying to convert Countif formulas into a vba formats but its giving me a run time error 1004 application or object define error...
My code and formulas:
For example,
=COUNTIF('Sheet1'!$D$14:$D$3000,$B25)-COUNTIFS('Sheet1'!$D$14:$D$3000,B25,'Sheet1'!$E$14:$E$3000,"No Test")
to
Range("A1").Formula = "=COUNTIF('Sheet1'!" & Sheets("Sheet1").Range(Cells(14, 4), Cells(3000, 4)).Address(False, False) & "," & _
Sheets("Sheet1").Cells(25, 2).Address(False, False) & ") -" & _
"Countifs('Sheet1'!" & Sheets("Sheet1").Range(Cells(14, 4), Cells(3000, 4)).Address(False, False) & "," & _
Sheets("Sheet1").Cells(25, 2).Address(False, False) & ",'Sheet1!" & _
Sheets("Sheet1").Range(Cells(14, 5), Cells(3000, 5)).Address(False, False) & ", ""No Test"")"