There is no TRANSLATE function to handle translating a table of characters to a different arrangement such as has been on mainframes. Such usage has been around in mainframe computing 1960's to present. Have never seen anything similar posted in VBA for Excel usage. In PL/I and REXX it is Translate, expect it to be same in SAS, in Assembler it is XLAT, in COBOL it is TRANSFORM. You can actually specify only the "to" string in REXX and the "from" string is the characters x'00 through x'FF (Helps to translate between EBCDIC and ASCII except that characters are not actually two way reversible).A couple of references showing usage of the REXX Translate function are
http://mitvma.mit.edu/cmshelp.cgi?REXX%20TRANSLAT%20(ALL and
http://www.scoug.com/OPENHOUSE/REXXINTRO/RXBISTTR1.4.HTMLYou would have to write your own User Defined Function.
newString = translate(oldString, toString, fromString)
Original Result toString fromString abcdef AbCdEf ACE ace abcdefg aBcdefg aB Ab abcdefgh AbcDefgh DRATs drats Abcdefghijk Ayxwvughijk zyxwvu abcdef B2: =personal.xls!translate(A2,C2,D2) Function translate(oldString As String, toString As String, _ fromString As String) As String 'David McRitchie, 2005-03-08 programming ' http://groups.google.com/groups?threadm=5a3801c523d6%2496b31760%24a401280a%40phx.gbl 'limited to equal length from and to strings for now 'ref. http://mitvma.mit.edu/cmshelp.cgi?REXX%20TRANSLAT%20(ALL Dim i As Long, pos As Long, str As String str = "" For i = 1 To Len(oldString) '-- InStr([start,] haystack, needle [,compare]) pos = InStr(1, fromString, Mid(oldString, i, 1), vbBinaryCompare) If pos = 0 Then str = str & Mid(oldString, i, 1) Else str = str & Mid(toString, pos, 1) '-- corrected End If Next i translate = str End Function
This topic has been incorporated into Remediation for Disastrous Google Beta Groups -- unfortuately there is not much remediation.My correct posting of code was trashed by the Beta version on Google, compare the code above (or even Beta Groups own original view) with the discombobulated code at at Google Groups (Beta), and that the old version of google groups at google.uk.co is still useable.
Google apparently has an agenda to proprietize newsgroups and take owership of postings. The one thing that makes threads unique in a posting is the message-id in your posting. Google is once again trying to hide that and create their own identifier.
The Google Beta groups has made a lot of things rather useless
- Email addresses and anything that looks like an email address (use of @) is frequently destroyed. People have been harvesting email addresses from newsgroup postings and specifically from Google searches. But the cure is worse than the problem. This has destroyed your ability to look at the original and find the message-id. It has destroyed posted coding in newsgroups.
- The use of HTML has been included so that they can add their advertising to your your postings and webpages without your consent. Read about link hijacking on a GoogleWatch.
- Trying to force plain text into HTML has essentially changed the format and syntax of my attempted code correction for the User Defined Function shown on this page. Trying to match parens or something.
- To divide an conquer Google has allowed the google.uk.co to still function but since the atrocious beta is still up since Nov 2004 (now Mar 2005) it is apparent they don't care what anyone thinks.
Please send your comments concerning this web page to: David McRitchie send email comments
Copyright © 1997 - 2005, F. David McRitchie, All Rights Reserved