It doesn't matter that the two columns are not adjacent.
If you select column AC:AC and AE:AE, conditional formatting has to refer to $AC1 and $AE1. If you apply conditional formatting only to the relevant cells, for example $AC$2:$AC$10 and $AE$2:$AE$10, you have to refer to the topmost cell in this range. In this example it's $AC2 and $AE2.
Also bear in mind the location of the dollar signs.