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.
' RefreshCounts Macro
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25, R[-14]C)"
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25,R[-13]C)"
ActiveCell.FormulaR1C1 = "=@CountCcolor(R1C1:R14C25,R[-12]C)"
Link to spreadsheet: https://drive.google.com/file/d/1aREautX3RGd6786MBRN7D2sYUUbieg7M/view?usp=sharing
September 9, 2020
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.