Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default need to turn a word into numbers (or ascii codes)

Sum? Maybe? Still not sure what you are doing there?
Function SumCharacters(rng As Range) As Long

Dim i As Long
Dim s As String
Dim lSum As Long
Dim myCell As Range

lSum = 0
For Each myCell In rng.Cells
For i = 1 To Len(myCell.Value)
s = Mid(myCell.Value, i, 1) 'mycell.text if it's formatted
If IsNumeric(s) Then
lSum = lSum + s
End If
Next i
Next myCell

SumCharacters = lSum
End Function


Regards,
Ryan---

--
RyGuy


"TG" wrote:

ok thank you, ill give you an example as soon as I can.

"Ron Rosenfeld" wrote:

On Tue, 2 Dec 2008 16:27:01 -0800, TG wrote:

how do i turn a word into ascii code? am trying to use vlookup to look up two
words (each word or value in their proper column) to find the third which is
what am trying to find. However, Vlookup appears to only work with number..
or is there an easier way (another formula) that i can use to work with
strings?
I have been trying to figure this thing out for hours and seem to get no
where.
Please explain with some detail if you have a solution.
Your help will be highly appreciated.
TG



Your premise that "Vlookup appears to only work with number" is wrong.

VLOOKUP works with text strings, as should be apparent from reading HELP for
that function.

If you would respond to Rick's question about demonstrating what you want to
do, someone will offer a solution.

--ron

Reply
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
Replacing Printable Ascii Codes susanmgarrett New Users to Excel 1 February 3rd 10 12:45 AM
Entering ASCII codes with Excel 2003 phuycke Excel Discussion (Misc queries) 2 January 1st 10 06:43 PM
Merge data from an ascii file into a Word doc Bernie Excel Discussion (Misc queries) 1 September 6th 09 06:54 AM
Ascii iinput file - separate text from Numbers [email protected] Excel Worksheet Functions 3 August 29th 06 02:46 PM
How do I save a Word file as an ASCII format? Laurie Excel Discussion (Misc queries) 5 April 6th 06 01:31 AM


All times are GMT +1. The time now is 03:31 AM.

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

About Us

"It's about Microsoft Excel"