Converting numbers to opposite value

Hi All,

I am attempting to obtain the number from excel and placing the opposite value into a web application.
e.g. if the cell read 1.23 the robot should enter -1.23

If true: RAACY = row(3).ToString.Replace("-","")
If false: RAACY = “-”+row(3).ToString


The robot was working fine until today where it added another ‘-’ and provided the following error.
Please note the cell read -86711.6767261885


This previously never happened and stuck to why the error is occurring.

Never mind I found the error in the if statement,

You can try following:

  1. Int info = Concert.ToInt32(row(3));
  2. If ( info < 0)
    info = info * (-1);