Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create an Excel name coder for CMD 770

2000 tutorials

How to create an Excel name coder for CMD 770

by  OzzieGeorge  Posted    (Edited  )
As you all know using matworks to program a station name has the pitfall that if you enter the phone type wrong it can screw things up. For this reason I always programme station names using Cmd 770. Now most people hate using this because of the need to convert the name to a hexadecimal code so I suppose its time I gave away a shortcut. I often give this spreadsheet away to customers who administer the names on their own systems so why shouldn't I give it to you guys.

in Excel cell A1 type "Type name below here" in B1 Type "Code will appear below here"

Then copy the rather lengthy formula below to B2

=IF(LEN(A2)>16,"Too many Characters. Must be 16 or less",IF(ISNA(A2),"",IF(A2>"",DEC2HEX(CODE(MID(A2,1,1)),2),
"")&IF(LEN(A2)>1,DEC2HEX(CODE(MID(A2,2,1)),2),"")&IF(LEN(A2)
>2,DEC2HEX(CODE(MID(A2,3,1)),2),"")&IF(LEN(A2)>3,DEC2HEX
(CODE(MID(A2,4,1)),2),"")&IF(LEN(A2)>4,DEC2HEX(CODE(MID
(A2,5,1)),2),"")&IF(LEN(A2)>5,DEC2HEX(CODE(MID(A2,6,1)),2),
"")&IF(LEN(A2)>6,DEC2HEX(CODE(MID(A2,7,1)),2),"")&IF(LEN(A2)
>7,DEC2HEX(CODE(MID(A2,8,1)),2),"")&IF(LEN(A2)>8,DEC2HEX
(CODE(MID(A2,9,1)),2),"")&IF(LEN(A2)>9,DEC2HEX(CODE(MID
(A2,10,1)),2),"")&IF(LEN(A2)>10,DEC2HEX(CODE(MID(A2,11,1)),
2),"")&IF(LEN(A2)>11,DEC2HEX(CODE(MID(A2,12,1)),2),"")&IF
(LEN(A2)>12,DEC2HEX(CODE(MID(A2,13,1)),2),"")&IF(LEN(A2)>13,
DEC2HEX(CODE(MID(A2,14,1)),2),"")&IF(LEN(A2)>14,DEC2HEX
(CODE(MID(A2,15,1)),2),"")&IF(LEN(A2)>15,DEC2HEX(CODE(MID
(A2,16,1)),2),"")))


You will then need to ensure you have the following add-ins ticked in the tools add-ins menu

Analysis toolpak
Analysis toolpak - VBA

Then if you type a name in A2 press enter or click elsewhere the code you need will appear.

Hope this helps

Edit:-

It has copme to my attention that copying and pasting this formula to the Excel cell does not work. This is because the web site has inserted carraige returns and line feeds where they are not needed. The formula above is one continuous line with no carraige returns or line feeds in it other than at the end. You will probably have to clean it up if you copy and paste it.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top