Human_doing
Board Regular
- Joined
- Feb 16, 2011
- Messages
- 137
Hi all,
Can anyone please help with this code
The issue is with the output in to cell F5 which is supposed to total the number of rows where column B = 'APPROVED' and column C = > today's date, however I get run time error 1004 'application defined or object defined error' when I try to run this? All the other formulae calculate correclty,
Any help much appreciated,
Thanks
Can anyone please help with this code
Code:
Dim LRTotal As Long
With ActiveSheet
LRTotal = .Range("B" & .Rows.Count).End(xlUp).Row
.Range("F2").Formula = "=COUNTIF(B2:B" & LRTotal & ",""*"")"
.Range("F3").Formula = "=COUNTIF(B2:B" & LRTotal & ",""COMPLETED"")"
.Range("F4").Formula = "=COUNTIF(B2:B" & LRTotal & ",""ABANDONED"")"
.Range("F5").Formula = "=SUMPRODUCT((TODAY()-C2:C" & LRTotal & "+0)*(B2:B" & LRTotal & ",""APPROVED"")"
End With
The issue is with the output in to cell F5 which is supposed to total the number of rows where column B = 'APPROVED' and column C = > today's date, however I get run time error 1004 'application defined or object defined error' when I try to run this? All the other formulae calculate correclty,
Any help much appreciated,
Thanks