Zend certified PHP/Magento developer

automatically copy cell formatting from one cell to another if a third cell is blank

If somebody could please help me.

I have a spreadsheet with column D containing a multitude of plan numbers, In column y there are only a few plan numbers which have different colored backgrounds.

I am trying to automatically copy the background color from column Y’s number to column D(because they match/are equal) ONLY IF Column A is blank.

I have tried conditional formatting where column D = column y, but the all the numbers change color even if column A has a value and that is where I am stuck to only have the cell change number if column A is empty.

I hope somebody can help me please.