ParseOutNames VBA

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
 
B

Bob Phillips

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)
 
G

Gerry Kuta

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
 
B

Bob Phillips

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)
 
G

Gerry Kuta

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!
 
C

Chip Pearson

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)
 
G

Gerry Kuta

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
 
B

Bob Phillips

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)
 
G

Gerry Kuta

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top