Hello Everyone,

I’m getting an issue in the excel, i have to sum one column data and write it into an intVariable but that variable contains “-ve” sign, so how can i remove that sign without changing anything.

Thanks in advanced.

Hello Everyone,

I’m getting an issue in the excel, i have to sum one column data and write it into an intVariable but that variable contains “-ve” sign, so how can i remove that sign without changing anything.

Thanks in advanced.

@Tushar_Gupta1 Math.Abs(-1) will return 1. I think you can use it accordingly, but if this is not what you needed then you may have to explain a bit more.

So the thing is variable contains dynamic value every time when bot runs.

If my variable is intSum then I should write the expression as follows

Math.Abs(intSum.ToString)

@Tushar_Gupta1 It’s the Convert to Double method that you can use on Strings or Integer values to Convert to a Double value. The Math.Abs() method accepts only Double values, hence we would have to convert the number to a Double in order to make it work

1 Like

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