Attempting my first Lookup Data Table

I am trying to perform a Vlookup between two data tables but keep getting the below error.

I want to look up the first column in dtZRFTC0004

I need to find the value in the ‘Org’ Coumn and return the division column from DTNRLOrgListing

i have played with this for several hours but cant figure out why its not sucessfully performing the lookup

Hi @Waterfowl_Waterfowl_hunte

You specified the Column name as Org in the Lookup datatable activity but in your datatable there is no column called Org. The Column names are as rows in your datatable.

Are you using any read range workbook activity to read the excel, if yes then check the add header option in the properties and try.

Give the proper column name in the Lookup datatable activity and try.

Hope it helps!!

I think i do have it right

In the ‘Lookup Value’ table there are no headers so i wrote LookupValue = dtZRFTC0004.Columns(1).tostring because i need the first column.

‘Org’ is the first column of the table im look at

Hi @Waterfowl_Waterfowl_hunte

I can help you with this.
Read Range start your range at the correct cell Maybe it should be A4.
if you have to read it from the top, you can use indexes.

You see there are some properties on the right,
you need to give Lookup column as 0
and Target Column as 4.
And then check your output variables.

You should have your desired value.

Lookup value should be like:

Here columnIndex means the column in which your value would be present.

Happy Automation! :smiley:

You given the Org and Division in the Column Names right. But if you print and see your datatable variables it shows the column names are like Column0, Column1, Column2 like this.

That’s why it was throwing error, it could not find the Org and Division columns in the datatable because the datatable has Column0, Column1 and Column2.

Hope you understand!!