Good afternoon. Please help me. I have a datatable. For example.
А B C
5 5 0
6 6 0
7 7 0
8 7 1
9 9 0

I need to set the “if” condition for column “C” value in row 1 <> 0 or value in row 2 <>0 or value in row 3 <>0 or value in row 4 <>1 or value in row 5 <>0. How do I do this without writing each line? There can be 100 rows instead of 5. The unit in line 4 is specified correctly and you need to compare the value in line 4 with 1.

Thanks!
The values in column " C " are the result of calculations. In lines 1,2, 3,5, the result should always be 0, and in line 4, the result should always be 1. If the result of calculations in lines 1 or 2 or 3 or 5 is not 0, or in line 4 is not 1, a warning should be issued.
I hope that I was able to clarify my explanation.

@bolbat_evgenia
Попробуй такое
Let integer n = yourDT.Rows.Count
Let integer zerosRowCount = yourDT.AsEnumerable.Count(Function (row) row(“C”).ToString.Equals(“0”))

Let boolean cond1 = zerosRowCount.Equals(n-1)
Let boolean cond2 = yourDT.Rows(4)(“C”).ToString.Equals(“1”)