Search code examples
google-sheetsgoogle-sheets-formula

Negative values in curly brackets in Google Sheets


In the file needs to make it so that with the help of {} brackets, the first column is output as usual, and the second column is output with negative values (sample inside the table). There may be alternative short formulas for the desired result. Current formula: ={A2:A,B2:B}.

File link: https://docs.google.com/spreadsheets/d/1hwCwu5eKZdSM9fpFcyl4dslIq-y5h_roU4sEVwaZYyE/edit#gid=0

enter image description here


Solution

  • Try:

    =ARRAYFORMULA({A2:A,if(B2:B<>"",-B2:B,"")})
    

    Result at J2:

    enter image description here