A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Your formula syntax is actually correct and it will not cause an error on its own as long as your version of Excel uses commas (,) instead of semicolons (;) to separate arguments. However, a formula can only output text, such as the word "ROJO" and cannot automatically change the background color of cell F4 by itself.
Depending on your computer's regional settings, Spanish versions of Excel often require semicolons (;) instead of commas (,). Try pasting this updated version into F4 to see if it resolves the error:
=SI(E4="";"";SI(E4<=FECHA.MES(HOY();6);"ROJO";SI(E4<=FECHA.MES(HOY();12);"AMARILLO";SI(E4<=FECHA.MES(HOY();24);"VERDE";"MAYOR A 24 MESES"))))
To make F4 turn red, yellow, or green automatically, use Conditional Formatting. Once your formula is working and displaying the words "ROJO", "AMARILLO", and "VERDE" in F4, select cell F4, go to the Home (Inicio) tab, click Conditional Formatting, select Highlight Cells Rules (Reglas para resaltar celdas), and click Text that Contains... (Texto que contiene...).
From there, set up each color individually while keeping F4 selected. First, type ROJO in the box, choose Light Red Fill (Relleno rojo claro) from the dropdown, and click OK. Next, repeat the menu navigation, type AMARILLO, choose Yellow Fill (Relleno amarillo), and click OK. Finally, repeat the process one last time, type VERDE, choose Green Fill (Relleno verde), and click OK.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin