Find out data present in cell based on data present in adjacent cell

Hi All,
I Want to find out the data present in the cell, based on data present in other cells. Below is an example.

In this excel file, I want to find out data present in column C based on data present in column B and column A. For example. If emailID is “” and Company is “Rediff” then it should return me representative column’s value “Re4”. If EMailID is and company is TCS, it should return me value “Re2” from the Representative column.


Hi @sandyk

Assume that this information in a datatable called DT

You have write this query
DT.Select("[EmailId]=‘’ And [Company]= ‘Rediff’ ")(0)(“Representative”).ToString

This will Give you desired output


Please mark as solution if found helpful :slight_smile:

Another way to do this would be to loop through the Data table using a for each row method.

The assign reads Representative = row("Representative").ToString

Thanks Bro! It was helpful.

Thanks Anupam. It was very helpful :slight_smile:

1 Like

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