+sign to negative, negative to +

Hai,

This is my excel sheet in that price column
There is negative and positive values will be there i need to change postive value to negative and negative value to positive
Like -$11.600,00 to $11.600,00
And $149,46 to -$149,46
Can you help please

multiply by -1

Can you explain more with how to write query in assign activity
Like
Price = math.abs(price ("-1").tostring)
It is correct

grafik
that is all we need for flipping

1 Like

I am not getting properly
@ppr how can be write in query please explain me

Hi,

Use the below steps.

  1. Use excel application scope to open the excel file.

  2. Read range activity to read all the values into data table DT and find rowcount with rowcount = DT.rows.count

  3. inside application scope Use following excel formula =D3*-1 and use write cell activity to insert the formula in the E3 cell.

  4. Use auto fill activity to auto fill the formula in the E column so that all the negative convert into positive and positive into negative.

  5. Use copy paste range activity source → source E3:E+rowcount Destination: E3:E+rowcount and sue the method values so that all formulas will be removed from the column.

  6. again use copy paste range this time source would be E3:E+rowcount and destination should be D3:D+rowcount.

with the above steps you could achieve your requirement in the excel itself.Please try and let us know thanks.

1 Like

There is another way is there

Hi Siva,

Are you asking like is there any other way for this requirement. Not sure about your comment.

How did you get the values like + to -
And negative to -
Writing query I need

Yes any other way for writing query itself we need to do within one assign activity