How can I check If in the total column there's a negative value?

I’m using an If in this form:

cint(row(“Total”).ToString) < CInt(row(“0”).ToString)

U can use if condition like this

Cint(row(“Total”))<0
Regards

Nived N

Happy Automation

A tricky one but may help just try once

  1. initialize the excel data into data table
    2)use lookup data table activity
  2. in the lookup column enter the column name
  3. in the lookup value enter “-” because if it’s a negative value then this sign would be there.( Assuming data in column is in string)
  4. if there no negative value then rowindex property will give -1

I’m getting an error because the column is double, the if is because If the value is negative I want to set a color in that cell

Hi @ahmadLH may i know what error u are getting?

I was using For each row also, using just the If is better :slight_smile: thanks

Did u check using below condition

CDbl(row(“Total”))<0

Sort DataTable by “Total” col and check the first row.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.