How To Get Last Name with Middle Names in Google Sheets

Learn how to extract the last name from a full name in Google Sheets, even when middle names are present, using a combination of the INDEX and SPLIT functions. This video provides a programmatic solution to automate the process.

In this video I'm going to show you that there is an error when we try to get the last name from a full name and it has a middle name. If we're using this index split formula combination and we're using the second column, we're going to just get the middle name. So how do you get the last name when there are middle names with this index split ? We can do this semi manually. If we see a middle name we can change this to three. We can change this one to three as well, but all the other ones are two. Well, that isn't very good. We want to do this programmatically or rather automatically, and we want to change this three when there are three items and we want to change it to two when there are two items. So what we're going to do is instead of the number three or the number two, we're going to put a count a formula here and we're going to use the exact Combine 2 Columns into 1: First Names and Last Names Together How to Get Middle Name from Splitting Full Name in Google Sheets

same formula we use for split here. So we're going to split a two. Comma, with a space, in quotes, and we can do true, true as well. Add another parenthesis at the end, and now this will automatically get the last name no matter how many names are in the full name. If you like this and you want more tricks, tips, and how to's in Google Sheets, subscribe here on YouTube or become a member over at BetterSheets. co. How Does Split Work? 5 Ways to Combine Names in Google Sheets How To Separate First And Last Name In Google Sheets