The aim of this study was to investigate the associations for specified substitutions between different subgroups of dairy products and the risk of type 2 diabetes. We used data from the Danish Diet, Cancer and Health cohort including 54 277 men and women aged 50–64 years at baseline. Information regarding intake of dairy products was obtained from a validated FFQ, and cases of type 2 diabetes were identified through the Danish National Diabetes Register. Cox proportional hazards regressions were used to estimate associations. During a median follow-up of 15·3 years, 7137 cases were identified. Low-fat yogurt products in place of whole-fat yogurt products were associated with a higher rate of type 2 diabetes (hazard ratio (HR) 1·17; 95 % CI 1·06, 1·29) per serving/d substituted. Whole-fat yogurt products in place of low-fat milk, whole-fat milk or buttermilk were associated with a lower rate of type 2 diabetes (HR 0·89; 95 % CI 0·83, 0·96; HR 0·89; 95 % CI 0·82, 0·96; HR 0·89; 95 % CI 0·81, 0·97; per serving/d substituted, respectively). The pattern of associations was similar when intake was expressed as kJ/d (kcal/d). These findings suggest that intake of whole-fat yogurt products in place of low-fat yogurt products, low-fat milk, whole-fat milk and buttermilk are associated with a lower rate of type 2 diabetes.