// take text for search from a variable
var textContains =!'';
// get table for search
var sourceTable = project.Tables["SourceTable"];
// search in each row
lock(SyncObjects.TableSyncer)
{
for(int i=0; i < sourceTable.ColumnCount; i++)
{
// read a row (array of cells)
var cells = sourceTable.GetColumn(i).ToArray();
// loop through all cells
for (int j=0; j < cells.Length; j++)
{
// check if cell contains specified text, if there are matches return "yes"
if (cells[j].Contains(textContains))
return i;
}
}
}
// if nothing found return "no"
return "no";