Search code examples
google-sheetsconditional-statementsinsertsymbols

Google Sheets: Compare Two Values in Different Cells and Insert Symbol In Another Cell Depending on Comparison Result


In Google Sheets, I want to write a formula that compares the values between two cells in the same row and then inserts a specific symbol in another cell depending on which one is larger. Please see screen shot below:

enter image description here

In my above example, since the value in cell B3 is larger than the value in cell D3, I want to insert the upward pointing delta symbol in cell C3.

Since the value in B4 is smaller than the value in D4, I want to insert the downward pointing delta symbol in cell C4.

Since the value of B5 is equal to the value in D5, I do not insert a symbol at all.

Is there a way for me to enter a formula (or use AppsScript if formula is not available) in column C that would allow me to automatically populate the correct delta symbol? The delta symbol can be found here in Google Sheets: here


Solution

  • You may try:

    =ifs(B3>D3,char(9650),B3<D3,char(9660),1,)
    
    • Use conditional formatting to color code the symbol

    enter image description here