Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Simple but frustrating

Hi...

I'm looking for code that will convert a column of first and surnames to an
adjacant column of initials. eg. column A says Bill Smith, I want column B to
say BS. This should apply to any name of any length...

Thanks in advance...

Gordon.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Simple but frustrating

This is a fomulma "B2", which refers to cell "A2". It can be copied down your
column. Fope this will do the job. If it has to be in code, then edit the
formula with the recoder turned on.
=LEFT(A2,1)&" "&MID(A2,FIND(" ",A2,1),LEN(A2)-FIND(" ",A2,1)+1)

"Gordon" wrote:

Hi...

I'm looking for code that will convert a column of first and surnames to an
adjacant column of initials. eg. column A says Bill Smith, I want column B to
say BS. This should apply to any name of any length...

Thanks in advance...

Gordon.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Simple but frustrating

Here is a cell formula that will do that:
=CONCATENATE(LEFT(A1,1),MID(A1,FIND(" ",A1,1)+1,1))

Mike F
"Gordon" wrote in message
...
Hi...

I'm looking for code that will convert a column of first and surnames to

an
adjacant column of initials. eg. column A says Bill Smith, I want column B

to
say BS. This should apply to any name of any length...

Thanks in advance...

Gordon.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Simple but frustrating

....and even shorter:

=LEFT(A1,1) & MID(A1,FIND(" ",A1)+1,1)

KL


"Gordon" wrote in message
...
Hi...

I'm looking for code that will convert a column of first and surnames to
an
adjacant column of initials. eg. column A says Bill Smith, I want column B
to
say BS. This should apply to any name of any length...

Thanks in advance...

Gordon.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Simple but frustrating

Hi, just incase you are trying to do this in VBA you may want to try
the following--'Find' doesn't get it done in the VBA editor(at least
not mine--Office 2003). The above examples work great as a worksheet
formulas.

Option Explicit
Sub conc_names()
Dim myVariable$, myCellValue$
myCellValue = Cells(1, 1)
myVariable = Left(myCellValue, 1) & Mid(myCellValue, InStr(1,
myCellValue, " ", 1) + 1, 1)
End Sub

HTH--Lonnie

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
Frustrating SUMPRODUCT problem. rmellison Excel Discussion (Misc queries) 1 January 6th 06 01:58 PM
IRR, XIRR and NPV - a very frustrating problem zacharychan Excel Discussion (Misc queries) 1 October 24th 05 09:01 AM
Very Frustrating - Please Help! picklevote Excel Worksheet Functions 1 September 14th 05 01:32 AM
Frustrating Problem Rebecca New Users to Excel 3 April 4th 05 02:35 PM
Bizarre and frustrating bug NJD Excel Programming 5 January 28th 04 09:50 PM


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