Combine various cells in to one array
I have the following formula that I would like to shorten it. Is it possible?
=12.5%*(($A$1=$C1)+(($A$1=$C6)*2)+(($A$1=$C11)*3)+ (($A$1=$C16)*4)+(($A$1=$C21)*5))
To following is just an idea but doesn't work on excel.
=12.5%*(($C1,$C6,$C11,$C16,$C21)=$A$1)*{1,2,3,4,5}
I wanted to use SUMPRODUCT but it only take contiguous array. Thanks for any input.
PS: I can not use array C1:C21 because other cells within it may equal to $A$1 which will return incorrect result. And the 3rd part, {1,2...} would be too long.
Last edited by Odin : May 20th 10 at 08:55 PM
Reason: Additional info.
|