You'll need two different conditional format rules to achieve this.

If A40 contains "Quit" or "Resign" Row 1 should be grayed out.
Highlight row 1, and use the conditional formatting option to enter the formula =OR($A$40="Quit",$A$40="Resign")

If A6 contains "Quit" or "Resign" which row should be grayed out?
In response to your question, row 6 will be grayed out.
Highlight row 6, and use the conditional formatting option to enter the formula =OR($A6="Quit",$A6="Resign")