Data mixed up in different Columns

Ali1586

New Member
Joined
Apr 1, 2021
Messages
3
Office Version
  1. 2013
Hi, I have a spread sheet where my data is a bit mixed up. For example:

Column A Column B Column C Column D
John Joseph Smith 01/01/1986
Peter Black 15/01/1956



I basically need them all in a Forename/Middle/Surname/DOB order and if they don't have a middle name then that cell can be blank. HELP!?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
will there only be 3 names at most , all with a space
Can you provide all possible examples you may have
Any Surnames with a double barrel name which has a space ?

Are they currently ALL in 1 column - Column A ?
Or randomly split across multiple columns

We can use a mixture of RIGHT() MID() Left() with a search for the space, but that will only work with the examples you have given so far - The layout/content is very important to getting the right solution

Although if the data is all in 1 column , then you can use DATA>Text to Columns and a Space as the delimiter
 
Upvote 0
Hi,

Attached is a file with formulas (custom one per column), that caters for different scenarios


1617272042152.png


formulas for each first column in fixed are:

Forename: =IF(ISTEXT(A3),A3,IF(ISTEXT(B3),B3,IF(ISTEXT(C3),C3,IF(ISTEXT(D3),D3,"No First Name"))))
Middle: =IF(B3=F3,IF(ISTEXT(C3),C3,IF(ISTEXT(D3),D3,"No Text Found")),IF(ISTEXT(B3),B3,"No Second Name"))
Surname: =IF(OR(C3=G3,C3=F3),IF(ISTEXT(D3),D3,""),IF(ISTEXT(C3),C3,""))
DoB: =TEXT(IF(ISNUMBER(A3),A3,IF(ISNUMBER(B3),B3,IF(ISNUMBER(C3),C3,IF(ISNUMBER(D3),D3,"No DoB Found")))),"dd/mm/yyyy")

Notes:
- In Surname, I am not adding any "No Last Name" note, you can change that and add it between the first set of "" in the formula
- You can remove the No First Name or No Second Name (or change them) by editing them (to remove, use "")
- if a date is not a date (like for Maya, day is 111, then you will get no DoB found
- I am using dd/mm/yyyy format, you might want to modify that depending your locale
 
Upvote 0
You're welcome. Glad we could help. :)

BTW, Welcome to the MrExcel board!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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