How to get Specific Cell value from excel file after true condition


I have one excel file where I need to check whether in A Column value contains or not. If A Column value matched the get the value from the same row but from C Column.

Ex. In below screen shot If A3 cell contains value “Darlington” then get the value " Darlington, SC, US" from C3

I have done the activity till get the datatable, I just value from C column.

Hello @nilesh.mahajan

You can try this Linq Query to get the results
use Assign Activity like this

ToolName = (From row in Origin_City_File_A_Column.AsEnumerable() Where row(0).ToString.Equals(“StringValueThat you are looking for”) select row(2)).ToList(0)


thnx for reply.

Unfortunatately it is not giving me output

This is a basic Excel → datatable example.

Use a read range to read your excelsheet into a datatable.
Then loop through that DT using ‘For Each Row in Data Table’
In the body you verify:
If row(“City Description”).toString = “Darlington” then
→ assign yourvalue = row(“eFregith…”).toString

Replace the strings with variable values where needed of course.

Alternatively you can also refer to the excel colums by nomber; row(0) row(3) etc if headers are changing a lot


I don’t want to replace the value, I just want to fetch the cell value from C column as per value find in A column.

Ex. If value find in A5 get the value from C5
If value find in A8 get the value from C8

Yes that is what my workflow does. It makes no changes in the excel whatsoever.
It just reads the excel into a virtual table in the memory, then checks it row by row for a match in column A, then feeds back the value of column D through the variable OutputValue.
(typo in my screenshot, it shoulf be row(3) not 4).

get the desired output…thnx

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.