Creating an array with list of names in Excel

I know this should be very simple, but I cannot find out how to create an array (string) of names using a list of names in Excel. Attached is the excel file with the names. I am hoping to store the names in an array and then search for each of the names in a text file using the for each loop.

Thanks for the help.LastNames.xlsx (9.4 KB)

Hi.

I know you can do this with LINQ using .Select()

It would look like this:

dt1.AsEnumerable.Select(Function(row) row("column").ToString.Trim).ToArray

You can also manipulate the string if you choose by changing the value inside the Select()
You can also take only unique values by adding .Distinct after the Select

Regards.