LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Parsing names from one column into 3.

A very nice improvement !
--
Gary''s Student - gsnu200739


"Rick Rothstein (MVP - VB)" wrote:

What about this modification to your subroutine?

Sub qwerty()
For Each R In Selection
S = Split(Replace(R.Value, ",", ""), " ")
For X = 0 To UBound(S)
R.Offset(0, X + 1).Value = S(X)
Next
Next
End Sub

Rick


"Gary''s Student" wrote in message
...
Sub qwerty()
For Each r In Selection
s = Split(r.Value, " ")
r.Offset(0, 1).Value = Left(s(0), Len(s(0)) - 1)
r.Offset(0, 2).Value = s(1)
If UBound(s) = 2 Then
r.Offset(0, 3).Value = s(2)
End If
Next
End Sub

--
Gary''s Student - gsnu200739


"Kevin Porter" wrote:

Have several spreadsheets that have the name of people in one column in
the
format - lastname, firstname MiddleInitial.

What I need to do is read that info and parse out each piece of info into
it's own column. One thing I am concerned with is some of the names do
not
have middle initials.

Thanks,

Kevin Porter





 
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
parsing full names in to 3 columns me[_10_] Excel Programming 9 March 11th 06 09:57 PM
Formulas for Parsing Full names jonefer Excel Worksheet Functions 3 February 14th 06 06:28 AM
Parsing a column chulita Excel Worksheet Functions 1 February 21st 05 11:19 PM
TypeLib Information Problem? Pass a Function's parameter names as string for parsing? Ali G Excel Programming 1 December 3rd 04 07:02 PM
Parsing Full Names of varying lenths and parts Dan Excel Programming 1 October 24th 03 06:26 PM


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