How to compare the value of actual line with de next line in excel?


#1

Hello everyone.

How can I compare the value of actual line with de next line (same collumn) in excel inside a for each loop?

For exemple:

Number
Row 1 - 6013
Row 2 - 6030
Row 3 - 6030

imagine the situation above and for each row I have to compare the value inside the variable (this variable initally contains “6013”) with the next value of the next line (6030).

thanks so much.


#2

assign counert=1

then compare in loop
datatable.rows(0)(counter)=datatable.rows(0)(counter+1)
counter =counter+1