Today, we are going to extract mid­dle names from full names. How­ev­er, not every­body has got a mid­dle name, so let’s start with the first and the last name. We can use here the Flash Fill option, which means that we just have to start writ­ing the first name, then anoth­er first name. After that, the Flash Fill com­mand does the work for us (Fig. 1).

Extract mid­dle names with Flash Fill
Using the Flash Fill option
Fig. 1 — Using the Flash Fill option

All we need to do is accept the results with Enter, and we have the first names (Fig. 2)

Entering the results
Fig. 2 — Enter­ing the results

We do the same with the last name, i.e., we start writ­ing the last name in the first cell, but this time we will force the Flash Fill option to work by press­ing the Ctrl + E key­board short­cut (Fig. 3).  This way, we have last names (Fig. 4)

 Flash Fill
Fig. 3 — Flash Fill
Flash Fill results
Fig. 4 — Flash Fill results

Now, the hard­est part – mid­dle names. We start writ­ing the mid­dle name in the first row, how­ev­er, we don’t have a mid­dle name in the sec­ond row. This time we’ll also use the Flash Fill option (Fig. 5)

Flash Fill for middle names
Fig. 5 — Flash Fill for mid­dle names

When all mid­dle names have been extract­ed, we can see an error. Edward isn’t a mid­dle name. We have to cor­rect the Flash Fill answer. We can do it, until the Flash Fill Options icon is show­ing up (Fig. 6).

Flash Fill icon
Fig. 6 — Flash Fill icon

We have to change the mid­dle name, which, in fact, isn’t a mid­dle name, for a dif­fer­ent mark, e.g. an excla­ma­tion mark. We sim­ply write the mark in the place of the error, press Enter, and the Flash Fill option will do its mag­ic again (Fig. 7) Excla­ma­tion marks are in the rows, where there aren’t mid­dle names.

 Exclamation marks
Fig. 7 — Excla­ma­tion marks

We can put almost any­thing in the place of the excla­ma­tion mark, e.g. a star (Fig. 8).

Stars
Fig. 8 — Stars

We usu­al­ly don’t want any stars or oth­er signs. We want to have blank cells, how­ev­er, the Flash Fill option doesn’t work  with spaces. That’s why we can use the Fil­ter option, which we can find in the Data tab (Fig. 9). In the Fil­ter option, we want to show only this sign (a star).

Filter option
Fig. 9 — Fil­ter option

Now, we’re left only with stars (Fig. 10). We have to select the range (Ctrl + Shift + ↓) and press the Delete key to delete all the signs.

Selected range
Fig. 10 — Select­ed range

Then we can turn off the fil­ter. We can do it man­u­al­ly, by press­ing the fil­ter icon and select­ing the Clear Fil­ter From “Mid­dle names” option (Fig. 11) or by press­ing the Ctrl + Shift + L key combination.

Turning off the filter
Fig. 11 — Turn­ing off the filter

Now, we have mid­dle names only in places, where they real­ly exist, and blank cells, where there aren’t any mid­dle names (Fig. 12)

Extracted names
Fig. 12 — Extract­ed names

https://www.youtube.com/watch?v=v46vQGjwx0w