Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default Extracting First Letter

Can anyone help, i'm trying to extract the first letter of each word within
any given phrase. I'm using excel 2003
--
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Extracting First Letter

Perhaps this might suffice

With text running in A1 down
In B1: =LEFT(TRIM(A1),1)
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"crackle" wrote:
Can anyone help, i'm trying to extract the first letter of each word within
any given phrase. I'm using excel 2003
--
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default Extracting First Letter

Sorry Max, let me be more specific, eg. Lets say I have the phrase "The quick
brown fox jumped over the moon" located in A1, now I want extract the first
letter of each word within that phrase, or any phrase I might put in A1.

What I am using it for is first letter memory techniques of any given phrase.
--
Thanks


"Max" wrote:

Perhaps this might suffice

With text running in A1 down
In B1: =LEFT(TRIM(A1),1)
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"crackle" wrote:
Can anyone help, i'm trying to extract the first letter of each word within
any given phrase. I'm using excel 2003
--
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Extracting First Letter

One way is to use this fine UDF (FrstLtrs) by Ron Rosenfeld

Here's the extract from Ron's reply to get you going ..

" .. Hi, I want to extract the 1st letter of each word in a string.
So for eg, in the string "my name is fred" I want to extract "mnif"

....

It's easy with a User Defined Function.
<alt<F11 opens the VB Editor.

Ensure your project is highlighted in the project explorer window, then
Insert/Module and paste the code below into the window.

To use this UDF, enter a formula of the type
=FrstLtrs(A1) where your string is in A1.

'===========
Function FrstLtrs(str As String) As String
Dim temp
Dim i As Long

temp = Split(Trim(str))

For i = 0 To UBound(temp)
FrstLtrs = FrstLtrs & Left(temp(i), 1)
Next i

End Function
'============
--ron

...."

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"crackle" wrote:
Sorry Max, let me be more specific, eg. Lets say I have the phrase "The quick
brown fox jumped over the moon" located in A1, now I want extract the first
letter of each word within that phrase, or any phrase I might put in A1.

What I am using it for is first letter memory techniques of any given phrase.
--
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default Extracting First Letter

Thanks Mate

works a treat. Don't know how it does it but is sure has saved me helluva
heaps of time.

--
Thanks


"Max" wrote:

One way is to use this fine UDF (FrstLtrs) by Ron Rosenfeld

Here's the extract from Ron's reply to get you going ..

" .. Hi, I want to extract the 1st letter of each word in a string.
So for eg, in the string "my name is fred" I want to extract "mnif"

...

It's easy with a User Defined Function.
<alt<F11 opens the VB Editor.

Ensure your project is highlighted in the project explorer window, then
Insert/Module and paste the code below into the window.

To use this UDF, enter a formula of the type
=FrstLtrs(A1) where your string is in A1.

'===========
Function FrstLtrs(str As String) As String
Dim temp
Dim i As Long

temp = Split(Trim(str))

For i = 0 To UBound(temp)
FrstLtrs = FrstLtrs & Left(temp(i), 1)
Next i

End Function
'============
--ron

..."

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"crackle" wrote:
Sorry Max, let me be more specific, eg. Lets say I have the phrase "The quick
brown fox jumped over the moon" located in A1, now I want extract the first
letter of each word within that phrase, or any phrase I might put in A1.

What I am using it for is first letter memory techniques of any given phrase.
--
Thanks



  #6   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Extracting First Letter

You're welcome. I'm sure Ron would be pleased that his UDF was a great fit
here !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"crackle" wrote:
Thanks Mate

works a treat. Don't know how it does it but is sure has saved me helluva
heaps of time.


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
#2: VBA to Pick Range and letter TomorrowsMan Excel Discussion (Misc queries) 2 November 17th 06 07:57 PM
#2: VBA to Pick Range and letter TomorrowsMan Excel Worksheet Functions 2 November 17th 06 07:57 PM
New Validation option to format 1st letter as Capital letter Jeff Excel Discussion (Misc queries) 5 July 13th 06 05:11 AM
Sort by number not by letter (C1, A2, B3, D4) dukemeiser Excel Discussion (Misc queries) 3 May 5th 06 02:40 AM
Have A Letter Reference A Name For An Intoduction travelersway New Users to Excel 2 February 16th 05 05:47 PM


All times are GMT +1. The time now is 10:07 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"