I didn't get the OP's values using this formula. I could with
=--(A5="x")+SUMPRODUCT(--(C5:IV5="x"),COLUMN(C5:IV5)-2)
but the OP only wanted 10 columns, so perhaps
=--(A5="x")+SUMPRODUCT(--(C5:L5="x"),COLUMN(C5:L5)-2)
would be better, or
=--(A5="x")+SUMPRODUCT(--(C5:L5="x"),COLUMN(C5:L5)-COLUMN(B5))
to avoid problems if a column is inserted to the left.
I'm also not sure what the --(A5="x") is doing (since the OP didn't
mention column A), and I suspect that one should replace ="x" with =$O$1
in the above formulae to correspond with his MATCH() formula.
In article ,
"Bob Phillips" wrote:
Sam,
Try
=--(A5="x")+SUMPRODUCT(--(C5:IV5="x"),COLUMN(C5:IV5))
|