That means given answers may not apply for newer SharePoint versions
For long explanation and work arounds see:
June 13th 2017 Microsoft blocked handling HTML markup in SharePoint calculated fields - how to get the same functionality back
You do not need the DIVs
And you may want to rewrite you code to produce a (Status) image for all Status values:
Do not forget to set the datatype to Number! This only works in Views not on Forms!
So you need images:
When building Formulas it is good practice to work from within Notepad (or any decent text-editor) and format you code with Linebreaks and indentations.
Then copy/paste to SharePoint which will ignore all that formatting.
SP2013/Online : CSR
I have answered a lot of Formula questions, they are all tagged with ICC (Inline Calculated Columns), easy to find with:
If you know (or want to learn) what a Browser Bookmarklet is; I have Open-Sourced code that makes Formula editting a bit easier; Main feature: it does a syntax check on every keystroke.