If your ceiling fan with light has a separate wire for the light and fan, you can connect them with the same switch.