How to findcolumn value based on smallest value of another column in excel

Hi All,

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

@thima

Use below expression to find the smallest value from data column.

   Double smallValue = yourDT.AsEnumerable.Min(function(row) Convert.ToDouble(row(“inMTSOCLLI”).ToString))

I have found smallest value already based on smallest value i need to find the value in other column how to do that?

Whether you want to compare the smallest value with the next column values??

Yes with the smallest value of “MTSO CLLI” column I need to extract the value of “MSC CLLI” column value

When you are finding the smallest value , find the index of that row so that by using that index you can get value easily.

Ok i will try

bro one small request your processing send to screen shot method i don’t understand please help me sir