ParseOutNames VBA

  • Thread starter Thread starter Gerry Kuta
  • Start date Start date
G

Gerry Kuta

Hi,
I'm trying to ParseOutNames from an employee list as per
Chip's VBA procedure at:
http://www.cpearson.com/excel/FirstLast.htm, but must be
missing something as I cannot get it to work. I get #NAME?
error across B2:E2.

Has anybody had experience with this code? I'd appreciate
any assistance! (I'm using 2000)
TIA
 
Gerry,

I have just tried it and had no problem.

The key, which I suspect might be in your problem, is in the statement

This procedure accepts a full name, as described above, and returns an array
for four elements -- the Last Name, the First Name, the Middle Initial, and
the Suffix. Therefore, you will need to enter this as an Array Formula.
Suppose you want the four parts of the name in A2 to be returned to B2:E2.
First, select cells B2:E2, enter =ParseOutNames(A2) and press
Ctrl+Shift+Enter rather than just Enter.

make sure you follow that precisely. The other thing to check is that you
put the code in a general code module.
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Bob,
Thanks for your input, however I still am having the
#NAME? error.
I have placed the code in Sheet1 and ThisWorkbook and in
both before, and after, working on Sheet1. I have the code
in 'General' and have entered the array as required. I
think I'm following the instructions but have more to
learn.
Any other help is appreciated!
TIA
 
Gerry,

In the VB IDE, menu Insert>Module and put the code there. Not Sheet or
ThisWorkbook, as the worksheet won't recognise it, giving #NAME

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Bob,
End Functionight(FullName, Len(FullName) - Pos2) Compile
error, means I probably must get a hold of our IT people
to get an install/upgrade!

Thanks for your time, again!
 
Gerry,

If you are getting a compiler error, then most likely some lines didn't wrap
properly when you cut and pasted from the web page to the code module. Post
the line of code that gets highlighted with the compiler error.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Hi Chip,

End Functionight(FullName, Len(FullName) - Pos2)

is highlighted in red when the popup advised me of a
Compiler error and that I needed to install a feature not
currently installed.

TIA
Gerry
 
Gerry,

It doesn't sound to me that this is a problem for the IT support guys.
Looking at your error suggests an input error. Wan t to mail me the workbook
directly for me to take a look?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Chip,
Your advice was correct, I pasted in a minimized window.
When done in the expanded window your code works for me. I
guess that's the price I pay for only having 5 months
experience!!!
Thanks folks, so much!!! (Pros make it look easy!)

Gerry
 
Back
Top