For those who wonder what I'm talking about in the message below - in the thread on Unitrunker Beta 6 in the Trunk Decoders forum, I posted a code snippet to be used with Excel or OpenOffice Calc, to allow one to convert between full decimal values (which Unitrunker saves MPT IDs in) and the prefix-ID format more understandable to the MPT user.
As it turns out, I was able to spend some time on it this morning after all... give these a try.
From decimal to 000-0000 format:
Code:
=TEXT(INT(B2/8192),"000")&"-"&TEXT(MOD(B2,8192),"0000")
It will
not stop you from typing in something that will be greater than a 3 digit prefix. I.e. "500000000" will get you "61035-1280". In other words, it doesn't check for a valid MPT talkgroup ID.
To go back from any dashed ID format to decimal, use this one:
Code:
=LEFT(B2,FIND("-",B2)-1)*8192)+(MID(B2,FIND("-",B2)+1,LEN(B2))
This one is a little more tolerant of widths and such .. doesn't matter if it's 2-203 or 002-0203 or 000000002-00000000203 or whatever.
Again, both these assume that the value you want to convert
from is in cell B2.