This wiring diagram illustrates the connections for a ceiling fan and light with two switches a speed controller for the fan and a dimmer for the lights. This setup allows you to control the light and fan separately.

Wiring Your Fan On A Single Or Dual Wall Switch Hunter Fan
Wiring a ceiling fan with 2 switches. Attach the red and black wires from the fan light unit to the top terminal screws on the switches. A remote is installed within the fan and one of the two wall switches is bypassed in order for remote access. One of the switches within the working of the fan is connected to a remote which can be controlled as you may guess remotely. Wiring a ceiling fan with two switches assemble the ceiling fan. Tuck the wires back into the box. Connect the three white wires from the ceiling fan and receiver together.
Connect the two white wires in the switch box together with a wire nut. Connect the lighting wire typically blue to the black fan wire and the black ceiling wire. The fan control switch usually connects to the black wire and the light kit switch to the red wire of the 3 way cable. Ceiling fan wiring two switches this ceiling fan wiring configuration is quite common. Remove the old. Connect white wires together.
Prior to removing the cap or the old ceiling fan you need to assemble the new one. Connect the black wire from the ceiling to the black wire from the receiver. Switched lines and neutral connect to a 3 wire cable that travels to the lightfan outlet box in the ceiling. Ceiling fan switch wiring diagram 2 line voltage enters the switch outlet box and the line wire connects to each switch. From the switches 3 wire cable runs to the ceiling outlet box. Connect the greencopper wires together.
More about wiring a ceiling fan. If you are not careful you can electrocute. Connect the three grounding wires green greenyellow stripe or bare copper coming from the ceiling fan rated electrical box the downrod attached to your fan and the ceiling bracket. The source is at the switches and the input of each is spliced to the black source wire with a wire nut. Wiring a ceiling fan is not hard but it is dangerous. A remote controlled ceiling fan utilizes the free space within the fans canopy.
Fan speed would need to be controlled by a pull chain. Connect black wires together. Wiring two switches for ceiling fans chuck to wire the second ceiling fan separately from the first ceiling fan the power source must be obtained from before the first ceiling fan switch or obtain a separate power source for the second ceiling fan. Turn the power back on and test the fan.