I have a text field in excel that looks like this:
123456 Smith, John
What I really want is to break this out so:
123456 is in a field called "employee id" AND
Smith, John is in another field called "employee name"
There can be anywhere from 3-6 numbers in the beginning part and then lastname, firstname will be consistent.
What is the best way to go about this? I'd offer up what I've tried so far but I'm not really sure where to begin with this.
Thanks
How about these two formulas (where A1 is the text field):
=LEFT(A1,SEARCH(" ",A1)-1)
=RIGHT(A1, LEN(A1)-SEARCH(" ",A1))
Use the first one to get the ID, and use the second one to get the name. It requires that there be a space after the ID for every entry.
In use:
Related
I have a datasheet in Excel with 154 Columns. A is with a profile name for example like this:
T_Data_Capture_CustomerData_(jp)
What I want to do is make a new Column with the full name of the Author from the initials that are in the profile name _(jp) (example Johnson, Paul).
Now I have multiple profiles here, with different people and their initials like: (ss),(mwp),(an) etc and I also have the Full Names of the Author and their initials as a seperate Datasheet from which I can read the data from.
Also the profile names don't all start the same, they are different in lenght, examples:
P_V8_Intersport_I_WE_IBD_AVIS_SAVE_XRange_(mi)
P_DSV-DM_Fortras-Release-6_BORD128_to_ALFLAT-ALBORD_(ak)
P_V4_100_Gardner_Denver_Credit_to_ALINVOICE_Part_01_Processing_Of_Data_(ss)
It would look something like this:
Profile name
Author
T_Data_Capture_CustomerData_(jp)
Johnson, Paul
P_V8_Intersport_I_WE_IBD_AVIS_SAVE_XRange_(ss)
Smith, Sophie
I just don't really know how to achieve this. Any help would be appreciated.
So, simple, but the first one relies on the initials being in the last 3 characters:
VLOOKUP(LEFT(RIGHT(A1,3),2),E2:F3,2,0)
If you want more characters then you can use mid() with find() to locate the ( as the start and ) as the end. Like so:
Trying to combine and IF + Concatenate together. I'm running a report right now for my company where we grab samples from different water locations, but due to COVID-19 we aren't allowed in some specific locations and therefore have to get a water sample from a nearby hydrant.
I have all the locations and hydrants in one spreadsheet as data, and in my main tab I have an empty cell where someone may put (YES/NO) and if they put YES then another cell will fill with the hydrant name along with the location.
My issue is I have to have both this data combined in one static cell if "YES" is put, for example...
Location: LOC-3 John Street
Hydrant used?: YES
Hydrant (auto filled): LOC-3 HYDRANT 3333
Full location name (if YES): LOC-3 John Street LOC-3 Hydrant 3333
Full location name (if NO): LOC-3 John Street
This is the code below that I'm using in order to return the location name, can't figure out where or how to throw concatenate in there without getting an error back. Thank you in advance for your help.
=IF(OR((AND((A6<>""),(D6<>""))),(AND((B6<>""),(D6<>"")))),IF(A6="",B6,A6),"")
(Not a complete answer, but too large for a comment)
Your first part of your logical expression is quite large, let's have a look:
[(a6<>"") AND (d6<>"")] OR [(b6<>"") AND (d6<>"")]
=[(a6<>"") OR (b6<>"")] AND (d6<>"")
=[(a6&b6) <> ""] AND (d6<>"")
Where a6&b6 has the Excel meaning (concatenation of a6 and b6).
This is already a significant simplification of your formula. You might try to simplify even further and go on from there.
I have a list of email names such as this:
Name.Surname#domain.com
Anothername.Anothersurname#domain.com
I'm trying to figure out an excel formula, that would do the following:
John.Doe#domain.com would be translated into an ID - JD
Nick.Doe#domain.com would be translated into an ID - ND
However, I want to make sure if there's a John.Doe and a Jane.Doe, that they'd get ID's that aren't the same (so for example it would be JD1 and JD2).
So essentially, I don't want to have two JD, but JD1 and JD2.
How would I achieve that with excel?
Thanks!
Use:
=UPPER(LEFT(A1)&MID(A1,FIND(".",A1)+1,1))&TEXT(COUNTIF($A$1:A1,LEFT(A1)&"*"&"."&MID(A1,FIND(".",A1)+1,1)&"*"),"00")
this will always put a two digit number behind the initials, regardless of number of employees with those initials.
I've got two lists of people and I have to check if they're in both lists. The thing is that characters are not accepted in one of the lists ("-" for instance), and the person might have omitted a last name in case they have two.
For example:
A1 B2
John Paul John Paul Jones
Mary Williams Ryan Roberts
Ryan Roberts-Johnson Mary Williams
My formula is: =IFERROR(MATCH($A1,$B$1:$B$1215,0),IFERROR(MATCH(LEFT($A1,FIND(" ",$A1,1)),$B$1:$B$1215,0),"No Match"))
The idea is: if the name is the same, bring me the line where the person is. If not, look for the first name and see if you find someone with this first and bring it to me. If neither works, reply with "No Match".
But apparently the Match function only retrieves exact matches, so the First Name one doesn't work.
Is there any other way to solve this?
EDIT1: First finding: I can use the SUBSTITUTE formula to replace - with space and do the search once again.
Some of the things I did to save up some time (I probably spent more time figuring out/researching than I would have if I had done ~3500 entries manually, but the learning opportunity was great.)
What I wanted:
To search for for a cell with name + surname when I only had the surname.
What I did: I remembered about the wildcards and used them with VLOOKUP:
First I got the last name and added the star: ="*"&RIGHT($A1,LEN($A1)-FIND(" ",$A1,1))
=VLOOKUP(A1,$B$1:$B$1000,1,FALSE)
And it would try and find the first one. Before that I added a check to make sure that there weren't two people with the surname (so it wouldn't throw another person there) with a simple IF(COUNTIF($C$2:$C$2000,$D219)<=2, and then the rest of the formula.
Something else that I noticed and serves as a reminder: TRIM is very important, as some of the cells had two spaces in between first name/last and some one space after the last letter of the last name. Using TRIM to create a new column made me avoid a lot of mistakes I only took a while to notice.
I believe the case is solved.
You could create a temporary column extracting the first name from B column.
See this example.
I am trying to split some data up but stuck! I have some data which comes out like the below:
USERNAME Full Name Department
USERNAME First Initial Surname Department
USERNAME Full Name Department
I have tried numerous items such as trim then can pull out words however some peoples full names are 3 words and most of them are 2 words so this kinda breaks it all.
I have also tried substituting the double spaces so it breaks it up like so
##USERNAME#######Full Name######Department###########
##USERNAME###First Initial Surname Department#
##USERNAME###########Full Name#####Department#####
But still unsure how I can pick up the words between the hashes.
Help really appreciated :)
If you have a text file with the raw data, separate the raw data using either of a TAB, a semi-colon, or a comma. Pick something you do not already have in your file. Semi-colon usually works for me.
Then, open it as a CSV (comma-separated values) file in Excel.
It will try to parse the file automatically. If it doesn't succeed, it will ask you what character you want to use as a separator.
You mentioned double spaces seperating your data, that's your ticket in.
Let's say you've got "USERNAME David Brossard DEPT" in Cell A2.
In B2, let's FIND the first double space:
=FIND(" ",A2)
In C2, let's FIND the second double space:
=FIND(" ",A2,B2+1)
In D2, we'll grab everything in between:
=MID(A2,B2+2,C2-(B2+2))
There you go!
Alternatively, you can write it all in one formula, in B2:
=MID(A2,FIND(" ",A2)+2,FIND(" ",A2,FIND(" ",A2)+1)-(FIND(" ",A2)+2))