If-then statements - searching through text

joeycg

New Member
Joined
May 23, 2011
Messages
4
Hi,

I am hoping someone can help me with my job of managing e-mail lists. Some lists have first and last names already separated, but some have both first and last names in a single cell. I was hoping to write an if-then statement to help separate first and last names in these cells. The way I imagine it working is that it would loop through the cell searching for characters, cut once it finds a space, and copy the first name into a separate column.

I only have elementary coding experience, so while I feel like this could be done, I have no idea how to execute. I am using Excel 2011 for Mac. Thanks for your time and patience.

Joey
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Before we can offer case specific alternatives, we'll need you to list every name combination type.
Examples:
A1: Firstname
B1: Lastname

A1: Firstname Lastname
B1: (blank)

A1: Lastname,Firstname

A1: Lastname, Firstname
etc.
 
Upvote 0
Ron, thanks for getting back to me.

It currently reads:
A1: Firstname Lastname
B1 is currently blank.

I am hoping to automate a process so that it reads:
A1: Firstname
B1: Lastname
 
Upvote 0
The issue was solved using the Text to Columns tool. Thanks for the help and I apologize for the novice post.
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,445
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top