View Single Post
  #7   Report Post  
DC
 
Posts: n/a
Default

Max,
Thank you very much!!!
This did the trick...

One last thing, I tried to use an =IF statement to make the formula cell
blank if the value is 0, but for some reason it did not work. It gave me
the #Name error.
Here is what I tried, please let me know if I did something wrong.
=IF(S10=0,"",{=SUM(IF(--(LEFT($D10:$Q10,1)=S$9),--SUBSTITUTE($D10:$Q10,S$9,"
")))})

Thanks again,
David

"Max" wrote in message
...
Put in the formula bar for V10:

=SUM(IF(--(LEFT($D10:$Q10,1)=V$9),--SUBSTITUTE($D10:$Q10,V$9,"")))


Clarification:

Think we could drop the "--(...)" for the
.. LEFT($D10:$Q10,1)=V$9) .. part

So, maybe revise the formula in V10 to:

=SUM(IF(LEFT($D10:$Q10,1)=V$9,--SUBSTITUTE($D10:$Q10,V$9,"")))

Array-enter with CTRL+SHIFT+ENTER, as before

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----