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 4 possible hex values at the moment so I was trying to put 4 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?
Note: Thanks for any help, I am happy to test any code and answer further questions. Please edit if necessary.