Iam finding the smallest value in excel column based on some conditions,But based on smallest value i need to find other column value how to do this, can any one help on this.
example iam getting smallest value inMTSOCLLI column based on that i need toread the value of MSC CLLI how to do that.Below is the cod ei wrote to find the smallest value. can some one please suggest?
Dim i As System.Double
i = Convert.ToDouble(dt.Rows(0).Item(“MTSOCLLI”).ToString)
For Each row As DataRow In dt.Rows
If Convert.ToDouble(row(“MTSOCLLI”).ToString) < i Then
i = Convert.ToDouble(row(“MTSOCLLI”).ToString)
End If
Next
For Each row As DataRow In dt.Rows
If Convert.ToDouble(row(“MTSOCLLI”).ToString) = i Then
str_Lat = Convert.ToDouble(row(“Lat”).ToString)
str_minValue = Convert.ToDouble(row(“MTSOCLLI”).ToString)
str_Long = Convert.ToDouble(row(“Long”).ToString)
End If
Next