Evansey,
I think you need to look a little closer to home for the answer to this one, you could be going round the houses when the answer may be on your doorstep. Why are the cells shaded, conditional formatting perhaps? If so, do a Simple if statement using you conditional formating criteria.
My philosopy and approach to this problem comes from a book I swear by "10000001 ways to problem solve with XL" by Stephen Barnes MDCVS. Try it out !!