View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Cost Coding? How in the.....?

For a series of legitmate letters in A1
"legitimate" meaning: included in upper case SOUTHPLACE

Try this ARRAY FORMULA*:
B1:
=SUM((MATCH(MID(REPT("E",10-LEN(A1))&A1,{1;2;3;4;5;6;7;8;9;10},1),{"E";"S";"O" ;"U";"T";"H";"P";"L";"A";"C"},0)-1)*(10^{7;6;5;4;3;2;1;0;-1;-2}))

Note1: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Note2: In case text wrap impacts the display, there are NO spaces in that
formula.

If A1: SOCCH
B1 returns: 129.95

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Justin Steiner" wrote:

I work for a computer retailer and we track our product costs and markup
using excel. I need to find a way to convert the numeric value of our cost to
text using a cost-code. Our code is SOUTH PLACE, with each letter of the code
having a corresponding value 1-0. For example, something costing $129.95
would be coded as SOCCH.

As it is, I have to type the cost code for hundereds of products manually
nearly twice a month. If anyone could point me in the right direction, I'd
REALLY appreciate it.