I am new to excell and wanted advise on the following or an example of this could be done.

I have a spreadsheet that allows me to enter 1 for attendance and 0 for non attendance, all in all this is fine, however what I would like to know is it possible to do the following and how.

If I enter for example the letter P the cell turns green then a number 1 appears and in my total colum it would still then count the amount of number ones. Etc
If I enter either S for sick or the cell turns yellow but a number 0 appears
If I enter A for absent the cell thrns red but number 0 appears
If I enter H for Holiday the cell turns blue but the number 0 appears
If I enter n/a the cell turns grey and a 0 appears
If I enter C for cancelled the cell turns orange and a 0 appears.