Forum Discussion
How to..
The fundamental answer to your question is "Conditional Formatting." Here's a set of instructional materials on conditions formatting.
BUT, seeing as how "the other letters" are coded a variety of colors, having "'PM' coded the exact same way as the other letters, where [you] can type and it will automatically add the colour as well" needs a bit more clarification.
For example, what is it about the string "PM" that calls for it to have that particular shade of green? Or is it the green that you want, rather than the pale yellow of your example? What if there were something else for "M"? And so forth. The current presence of a rainbow of colours raises more questions than your single example addresses.
What is the bigger picture here? What purpose are the colours serving (presumably something more substantive than simple aesthetics)? Are you also, eventually, going to want more rules for all those other colours?