Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel multiple values in one column, need to split

Status
Not open for further replies.

redbunny78

Programmer
Sep 26, 2007
29
US
I have an excel spreadsheet with several values that have been stored in one field. How can I best split them into other columns?

This is what it currently looks like:

Name
Dr.William R. Hendee
Rose Y. Byland MD.
Ms. Cynthia Allen

I need it to look like this:

A B C
Salutation Name Designation
Dr. William R. Hendee MD.
Dr. Rose Y. Byland MD.
Ms. Cynthia Allen

So, if it has a Dr. designated in column A - place an MD in column C. If there is an MD in column C, then place a Dr. in column A. And if there is a salutation(Ms., Mrs., Miss) in column B, place it in column A. If there isn't one, then leave it blank.


 
A given cell cannot contain both a formula and a constant value simultaneously.

So, as I wrote in reply to this question in the VBA forum, if you are constrained by the requirement as stated, then a programmatic solution is required.

You're requirement appears to be unnecessarily over-constrained however. If you don't impose the need to overwrite existing data then the problem is trivial.

In the VBA post you ask for a hint, so here is one.

if it has a Dr. designated in column A - place an MD in column C.

Excel has an if[/] function, and built-in help.

Try some things out on your own. If you have some specific questions, ask them.
 




Is this a one shot deal, or will it be recurring?

Skip,

[glasses]Did you hear what happened when the OO programmer lost his library?...
He's now living in OBJECT poverty![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top