Extract the last substring from a cell

This works, even when there are middle names: =MID(A2,FIND(CHAR(1),SUBSTITUTE(A2,” “,CHAR(1),LEN(A2)-LEN(SUBSTITUTE(A2,” “,””))))+1,LEN(A2)) If you want everything BUT the last name, check out this answer. If there are trailing spaces in your names, then you may want to remove them by replacing all instances of A2 by TRIM(A2) in the above formula. Note that it is only … Read more

Excel Date Conversion from yyyymmdd to mm/dd/yyyy

You can convert the value to a date using a formula like this, next to the cell: =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)) Where A1 is the field you need to convert. Alternatively, you could use this code in VBA: Sub ConvertYYYYMMDDToDate() Dim c As Range For Each c In Selection.Cells c.Value = DateSerial(Left(c.Value, 4), Mid(c.Value, 5, 2), Right(c.Value, 2)) … Read more