Thank you for your patience - I have tried that - I do not get any error messages - however it still adding in the coloured cells that have a 1 or 2 in column AP (results are in AQ if that is relevant, coloured cells are B to AL)
formula in AP is =CountCellsByColor(B4:AL4, $AV$4)
formual in AQ is =SumCellsByColor(B4:AL4, $AV$4)