Excel Sheet, assign values of one column to strings

Hello!

I have an excel sheet with multiple values in column B. I would like to assign all the values of this column B (20 different rows) based on their name that is indicated in column A.

How can I do this? Is the function for each row → assign "Output.rows(index).item(“Name in the column A”).ToString

Thanks!

How about use dictionary?
You could read both columns A:B to a datatable (DT) and then convert the DT to dictionary (DICT)

DICT = DT.AsEnumerable.ToDictionary(Of String, String)(Function(row) Cstr(row(“key”)), Function(row) cstr(row(“value”)))

And to get the value use
Value = DICT(“Name in the column A”)

Cheers