LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Function or Sub to help with text string

Hi Jack,

Am Tue, 11 Jun 2013 08:21:30 -0500 schrieb Jack Deuce:

I'd like to enter the text message in one cell and in the other have
that string evaluated by substituting the value in lookup column B for
that character representation. The word HELLO would translate to
4433555555666 H=44 E=33 L=555 L=555 O=666. I haven't been able to
find a function that would transform each text character to the
numeric pattern. Once the transform is complete, I'd just have to
look at the returned string to type the message. I assigned a space
the character code of 247.


try this function:
Function DialWord(myRange As Range) As String
Dim i As Integer
Dim myStr As String
Dim c As Range

For i = 1 To Len(myRange)
Set c = Range("A1:A26").Find(Mid(myRange, i, 1), _
LookIn:=xlValues).Offset(0, 1)
myStr = myStr & c.Value & "-"
Next
DialWord = Left(myStr, Len(myStr) - 1)
End Function

If you write "Hello" in D1, then in another cell:
=DialWord(D1)
The result will be:
44-33-555-555-666


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a function that will evaluate a text string in a cell? Dave Excel Worksheet Functions 2 October 7th 09 04:25 AM
use concatenate function to put carrage returns in a text string dabblingandconfused Excel Worksheet Functions 4 August 15th 06 04:58 PM
Evaluate text string as a function benb Excel Discussion (Misc queries) 3 July 19th 06 02:41 PM
Countif function for instances of text string contained Garbunkel Excel Worksheet Functions 1 October 11th 05 08:09 AM
VBA Function to evaluate hlookup text string as formula Eric[_22_] Excel Programming 2 August 2nd 04 04:57 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"