Researchers said: "Our results provide an additional argument for the role of physical activity as a means to promote the health of the population even in the presence of other less healthy behaviours."
But head of health information at the World Cancer Research Fund, Sarah Toule, warned people not to see these results as a "get out of jail free card".
She added: "Doing more physical activity can have great health benefits and our own evidence shows that, if everyone in the UK was regularly active, about 12,000 cancer cases could be prevented every year.
"However, by not drinking alcohol, 24,000 cancer cases could be avoided."
The study, published in the British Journal of Sports Medicine, said over 60 per cent of people who took part did not meet the minimum recommended amount of excercise.