# Cumulative comparison in Excel

Hello all,

1. I read dt excel and filter B column by BRV.
2. Each loop dt BRV
Loop BRV230906-0001
Assign Money = CurrentRow(“columnL”).tostring
I want to compare Money as picture

IF `L19-L12 > L13 (continue) : 120,000,000-85,015,159=34,984,841 > 24,235,200`

`L19-L12-L13 < L14 (stop and Write into L14) : 120,000,000-85,015,159-24,235,200=10,749,641 < L14 `
Stop and Write into L14. Thank all

Hi! If you are working with data tables, you can achieve that kind of comparison using IF activities. you can access DT components by CurrentRow(“ColumnName”). Let me know if you still have questions.

Try this:
`Money = (CDec(row("L19").ToString) + CDec(row("L12").ToString)).ToString()`

``````If (CDec(Money) > 24935200) Then
Assign row("L14") = "Continue"
ElseIf (CDec(Money) < CDec(row("L14").ToString)) Then
Assign row("L14") = CDec(Money).ToString()
``````

Hi @supriya117
I mean
If (CDec(Money) > L13 need continue assign Money = Money + CDec(row(“L13”).ToString)).ToString()

To compare next row L14,L15…?