View Single Post
  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

Bernie Deitrick wrote...
No. You need to use a UDF. . . .


No you don't. This can be done with formulas, and not terribly complex
ones.

=SUMPRODUCT(LEN(x)-LEN(SUBSTITUTE(x,{"M";"D";"C";"L";"X";"V";"I"},"") ),
{1000;500;100;50;10;5;1})
+SUMPRODUCT(LEN(C1)-LEN(SUBSTITUTE(C1,{"CM";"CD";"XC";"XL";"IX";"IV";0 },"")),
{-100;-100;-10;-10;-1;-1;0})