methode2404
New Member
- Joined
- Sep 3, 2018
- Messages
- 30
Hi,
I will insert this formula to cell with VBA
=COUNTIFS('today'!C:C;OOS_daily!G1;'today'!G:G;0;'today'!D:D;"<>N";'today'!O:O;0;'today'!P:P;">0")
I try this;
Sub test()
'
' test Macro
'
'
Columns("G:G").Select
ActiveSheet.Range("$G$1:$G$50000").RemoveDuplicates Columns:=1, Header:=xlNo
Range("H1").Select
Worksheets("OSS_daily").Range("H1").Formula = "=COUNTIFS('today'!C:C;OOS_daily!G1;'today'!G:G;0;'today'!D:D;""<>N"";'today'!O:O;0;'today'!P:P;"">0"")"
End Sub
I get the error message : run-time error '9': (for the last line)
can someone tell me where the problem is ?
Best Regards
Metin
I will insert this formula to cell with VBA
=COUNTIFS('today'!C:C;OOS_daily!G1;'today'!G:G;0;'today'!D:D;"<>N";'today'!O:O;0;'today'!P:P;">0")
I try this;
Sub test()
'
' test Macro
'
'
Columns("G:G").Select
ActiveSheet.Range("$G$1:$G$50000").RemoveDuplicates Columns:=1, Header:=xlNo
Range("H1").Select
Worksheets("OSS_daily").Range("H1").Formula = "=COUNTIFS('today'!C:C;OOS_daily!G1;'today'!G:G;0;'today'!D:D;""<>N"";'today'!O:O;0;'today'!P:P;"">0"")"
End Sub
I get the error message : run-time error '9': (for the last line)
can someone tell me where the problem is ?
Best Regards
Metin