Aug 12, 2024 07:41 AM
I can't believe a very simple feature in excel/google sheets is missing here in formulas when it comes to subtracting two numbers and if it's negative - show the number in one color, and if it's positive - show the number in another color
so I have a pretty simple setup
Field 1: Cal+/-
Formula is: 2300 - Cal
results will be a number Less than 0, 0 or greater
Formula is: If({Cal+/-} < 0, ??, ??)
What do I use in the ?? to show less than 0 in red or 0, greater than 0 in green
Solved! Go to Solution.
Aug 12, 2024 08:01 AM
Hello,
I have been faced with the same issue and the only solution that I came up with was the following (someone may have a better solution):
Where "display value" is the formula :
Aug 12, 2024 08:01 AM
Hello,
I have been faced with the same issue and the only solution that I came up with was the following (someone may have a better solution):
Where "display value" is the formula :
Aug 12, 2024 09:14 AM - edited Aug 12, 2024 09:16 AM
Thank you for the suggestion/solution. I cant get the green circle to work but the red and white don't want to - they are showing.
Not sure why its not working in the formula cause it's the same code that when I pasted it back here like this - it works.
Aug 12, 2024 09:35 AM
Hello,
It seems that formula has been perverted when I pasted it into my message.
try to modify the formula by removing calls to ":red_circle:" and to ":white_circle:", and inserting icons of your choice using the key combination " windows + . "
Regards,
Pascal
Aug 12, 2024 09:38 AM
Can you please try this formula
IF({Cal+/-} < 0, "Negative", IF({Cal+/-} > 0, "Positive", "Zero"))
Aug 12, 2024 09:39 AM
Welcome to the world of databases. Although Airtable has many features that are similar to a spreadsheet, there are also some things that are fundamentally different. Having different colored text based on the formula result is one of those things that is simple for a spreadsheet but impossible in Airtable. Airtable does not let you customize the font color, size, stye, etc. the solution that Pascal provided of using a colored emoji is a good one.
If you are having trouble copy/pasting the emoji, you can go find the emoji you want somewhere else one the web and copy/paste it from there. Sometimes this forum does weird things with formatting. In general, if possible it is better to format formulas as code on this forum.
IF(
{Cal daily} < 0,
"🔴" & {Cal daily},
IF(
{Cal daily} > 0,
"🟢" & {Cal daily},
"⚪" & {Cal daily}
))
Aug 12, 2024 10:07 AM
That worked. Got my little happiness done
Aug 12, 2024 10:08 AM
It was just replacing the icons. Got it handled.