Back in the early 70's, Car & Driver did some testing on this. There was a definite negative impact on gas mileage when driving with the windows open vs leaving them closed. I don't remember if they tried it with AC on and off.
They also tested a bunch of other mods, such as front air dams and reducing the opening in the grill, and found some of them really worked.
Their test vehicle was a Pinto. Today's more aerodynamic cars might not get such favorable results. It would be an interesting project for them to redo.
How come I can't remember where I put my car keys, but I can remember a magazine article from 30 years ago?