Remove Middle Name from "Last, First Middle" - excel-formula

I have a list of people whose names are in excel in the following format in a single cell: "Last, First Middle". I'm looking to only keep the first and last name in this format: "First Last". What would be the best way to accomplish this? I've tried text replace, a few random formulas I've googled but nothing works and am stuck. Thanks in advance.

I'm not super knowledgeable, but I believe you can select the second row (meaning the one with FIRST MIDDLE and use find/replace to delete anything after a space. Sorry I don't know that much but this link may help you: https://www.mrexcel.com/forum/excel-questions/527559-deleting-everything-after-first-space-cell.html
Also, searching "excel, remove after space" in Google may help too.
Hope everything works out well.
EDIT: Here's another link : https://www.extendoffice.com/documents/excel/1623-excel-extract-text-before-space.html

One more shorter formula for you to try,
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1),LEN(A1))&" "&LEFT(A1,FIND(",",A1)-1))
Hope this helps

Related

Extract information before several special characters in excel

I have a problem with an excel file.
I am trying to extract information from a column. This information appears randomly, before a ".", "-" or ":". So an example would be:
CELL
EXPECTED RESULT
hi.this is:
hi
maybe I- this works
maybe I
Who is: what. like-
Who is
I am using the formula:
=MID(A1,1,FIND("-",A1,1)-1)
Using this one, I get the information I need, but I am not able to add the other characters (".", ":",...) to the formula. Also I have the problem that in a same cell, I can have several of this characters, and I only want the information before the FIRST character (of all posible kinds) that appears in the cell.
I dont know if somebody can help me here.
Thank you very much in advance!
You can try:
Formula in B1:
=TEXTBEFORE(A1:A3,{".","-",":"})
If you don't yet have acces to TEXTBEFORE() then try:
=LEFT(A1,MIN(FIND({".","-",":"},A1&".-:"))-1)
I suppose this is an array-entered formula in versions prior to ms365.

EXECEL what is the wrong with this formula always get this error

i tried to change the cells format but no think is happened still there is problem
First of all, I would like to say that best way would be as #Rory suggested in the comments. He said:
Select the cells, press Ctrl+H, enter a $ sign in the find box, leave the replace box empty, and press Replace All.
It's easier to work if you input your data the right way.
Anyways, this may work for you:
The formula I've used is:
=SUMPRODUCT(VALUE(SUBSTITUTE(B2:B4;"$";"")))/B5

Extract Specific Value from Cell in Excel

I have a work dilemma. I have some cells, too many to manual work, that have some combination of the below:
"grievance 01-11 filed 09/19/02"
I am hoping to get only the "01-11" or whatever combination of xx-xx from the cell. I have used =LEFT(R102,FIND("-",R102)-1), but it gives me everything before/after the dash.
Thank y'all for any assistance!
Use SEARCH:
=MID(R102,SEARCH("??-??",R102),5)

Sharepoint calculated column returning #Name?

I have a SharePoint calculated column that is as follows:
=RIGHT(Hip,LEN(Hip)-INT(FIND("-",Hip)))
Basically what this does is return the last digits after the "-" in a string, but for strings that do not contain a "-" it returns #Name? into the column. Does anyone know of an easy way to change this formula to make it say what I want? Or is it just easier to re-think the formula all together. Thanks guys.
You need to use an =IF() statement around this if you're using hyphens that may or may not be there. IF(check for hyphen, hyphen formula, non-hyphen formula), The MSDN information is here for the full docs.
Thanks Graham, I appreciate your time. Your thoughts were definitely helpful! Here is the final solution -
=IF(ISNUMBER(FIND("-",Shipprod)),RIGHT(Shipprod,LEN(Shipprod)-INT(FIND("-",Shipprod))),"Not OK")

Excel 2007 Macro - Make Username using first initial of first name and full last name

I'm looking for a macro that will create usernames based on the first initial of the first name and the entire last name. In doing some research, I found this article [here][1] which looked like the exact answer to my question.
I'm new to the excel macro world and was having issues adapting the answers found on the linked page to my specific excel file. My username column is (B), first name (D), and the last name is (E). Based on a set up such as this, I was hoping someone could help me with the proper macro. There are about 600+ entries and having this would make life much easier. And more importantly, I'd like to know how to do it :)
Thanks in advance for the help.
Don't need a macro, a formula will do it.
in B1:
=left(D1,1) & E1
Drag down
If you want it in uppercase then wrap in in an upper statement and if you want it in lowercase wrap it in a lower statement

Resources