Giordano Bruno
Well-known Member
- Joined
- Jan 7, 2007
- Messages
- 1,356
I've created a UDF that returns the values "Good", "Average", "Bad" depending upon the colour of the text format of a cell. I'm trying to use it in an array formula or a sumproduct formula, but I get only a zero or one which seems to have little relationship with the actual colours of the cells.
This is one attempt =SUM(IF(ChkColor(E5:R5)="Good",1,0)) entered as an array. Gives either 1 or 0.
Another attempt =SUMPRODUCT(--(ChkColorE5:R5)="Good")). Gives either 1 or 0.
The formula =(chkColor(E4)="Good")+(chkColor(F4)="Good"...+(chkColor(R4)="Good" does provide the correct value, but I don't want to use a formula with 14 separate cell references.
Anyone have an idea what I'm doing wrong.
This is one attempt =SUM(IF(ChkColor(E5:R5)="Good",1,0)) entered as an array. Gives either 1 or 0.
Another attempt =SUMPRODUCT(--(ChkColorE5:R5)="Good")). Gives either 1 or 0.
The formula =(chkColor(E4)="Good")+(chkColor(F4)="Good"...+(chkColor(R4)="Good" does provide the correct value, but I don't want to use a formula with 14 separate cell references.
Anyone have an idea what I'm doing wrong.