How can i check if an Excel column contains the same value in every cell?

I need a function that will return true if all the cells from column currency contains same string, in this case “HUF”, but this is variable.

Thank you!

lets assume excel is read ranged into a datatable

YourDataTable.AsEnumerable.All(Function (x) x(ColNameOrIndex).toString.Trim.ToUpper.Equals(YourTestStringVar.Trim.ToUpper))
1 Like