Forum Discussion

DannyDonkey's avatar
DannyDonkey
Copper Contributor
Jul 01, 2021
Solved

Swap number's sign

Hey everyone,

Does it exist a formula that replaces a number value's sign with the opposite sign?

 

English is not my native language, and I do not have any experience with using English mathematical terms, so I am not sure whether or not I am expressing my question correctly. Simply what I am looking for is a formula that replaces as example "-4" with "4" and 32 with "-32".

  • So far my only viable option is to multiply source cell by -1 like this:

    =[source cell]*-1

    This works well with my current calculator sheet, but for a future broader usage this wont work with algebraic expressions unless there is a way to make algebraic expression recognised by the application.

5 Replies

  • DannyDonkey's avatar
    DannyDonkey
    Copper Contributor

    So far my only viable option is to multiply source cell by -1 like this:

    =[source cell]*-1

    This works well with my current calculator sheet, but for a future broader usage this wont work with algebraic expressions unless there is a way to make algebraic expression recognised by the application.

  • JMB17's avatar
    JMB17
    Bronze Contributor

    If you mean to change the sign, but leave the values in the same cell, then you could input -1 into an empty cell. Then, copy that cell, select the range you want to change, right click, select paste special (a dialog box should pop up), and select "multiply." Then, delete the cell with -1 in it. Be sure to make a backup of your data before testing.

     

    Edit: I am assuming that the numbers you want to change are constant values, i.e. the cells just contain the numbers and not formulas that result in a number.

Resources