New Member
March 25, 2021
I have this code and get the Error 1004 when running the code. I have double checked that all numbers are correct. It worked previously so I do not know why it will not now. The other macros in the sheet work. Thanks for your help.
Sub RefreshCounts()
'
' RefreshCounts Macro
'
'
Range("D16:E16").Select
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25, R[-14]C[32])"
Range("L16:M16").Select
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25,R[-13]C[24])"
Range("Q16:R16").Select
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25,R[-12]C[19])"
Range("S18").Select
End Sub
Link to spreadsheet: https://drive.google.com/file/d/1aREautX3RGd6786MBRN7D2sYUUbieg7M/view?usp=sharing
September 9, 2020
Hi, Brooke,
This error often occurs when referring to an invalid cell range.
I prefer to work in a different way: I have added a module 6 which calculates the number of cells with the determined colours and then I perform the calculations which I enter in the different cells. In the file, the button 'Refresh Counts' refers to this.
BR,
Lionel
1 Guest(s)