I am attempting to change the value of a cell in Google Sheets based on the value of an adjacent cell. This adjacent cell gets its value from the colour of the cell adjacent to it using the formula from this Quora answer. So the value of the cell should change based on the hex code which is obtained from the colour of the first cell. There are four possible hex values at the moment so I was trying to put four different IF statements in the same cell, so its value is changed based on this.
My first attempt led to a formula parse error:
=if((J2="#00ff00","Read"), if(j2="#ff0000", "Unread"), if(j2="#ff9900","In Progress"), if(j2="#000000", "Not Applicable"))
It is clear you cannot simply separate if statements with commas. Based on this Stack Overflow question I tried this code, with nested IF statements:
=if((J2="#00ff00","Read", if(j2="#ff0000", "Unread", if(j2="#ff9900","In Progress",if(j2="#000000", "Not Applicable")))))
This also leads to a formula parse error.
Is there any way I can simply include multiple IF statements in the same cell which will work for my code?
IFS
function is a more elegant solution than any of the answers: support.google.com/docs/answer/7014145?hl=en -- just adding it as I found this from a search and none of the answers were really clever enough.