jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 840
Hello,
The following code I have recorded as an array formula but it runs as a run-time error 1004. It is 246 characters, so under the limit of 256 - any ideas why it will not work please?
The following code I have recorded as an array formula but it runs as a run-time error 1004. It is 246 characters, so under the limit of 256 - any ideas why it will not work please?
Code:
Range("T10").FormulaArray = "=AVERAGE(IF(ROW(R2C16:R5000C16)<=SMALL(IF(ISNUMBER(R2C16:R5000C16),IF(R2C2:R5000C2=VALUE(R[-7]C[-1]),ROW(R2C16:R5000C16))),MIN(SUM(IF(R2C2:R5000C2=VALUE(R[-7]C[-1]),IF(ISNUMBER(R2C16:R5000C16),1))),5)),IF(R2C2:R5000C2=VALUE(R[-7]C[-1]),IF(ISNUMBER(R2C16:R5000C16),R2C16:R5000C16))))"