You already have the fan installed, but you need to know how to wire the new fan to a switch to make sure that all your hard work isn’t for nothing and the new fan runs correctly.
Turn off the power and test the wires to make sure that the power is off. Lock the box, put electrical tape over the switch and/or put a sign up warning others not to turn on the switch because you are working with electricity.
Determine whether you are installing a single switch to operate both the fan and the light at the same time or if you wish to operate the light and fan independently by separate switches. If you install a single switch, wiring will be straightforward. If you are installing a double switch, you will need to run a three-wire cable between the fan unit and the electrical box. Exhaust fans with lights, heaters, timers, etc. may need additional cable from the switch box to the fan. Check the manufacturer’s instructions for any specific wiring needs for the unit.
Run a length of cable from the light switch to the fan unit.
Make the connections at the fan unit using wire nuts. A wiring diagram should be provided by the manufacturer. Installation may be as easy as connecting the bare wires to one another, black to black and white to white. A grounding clip should be provided in the housing; attach the ground wire to the clip.
Gently push wires into the wiring box area of the fan housing and install the cover.
At the switch, splice the white wires and connect the ground wire securely using wire nuts.
Connect power to the two switches through two pigtails hooked to the feed wire. Pigtail connection consists of a piece of electrical wire used to connect two or more wires, usually the same colour of the wires you are going to connect (see References). Using wire strippers, strip about 1.8 cm (3/4 inch) off the wires you will connect together, including the spare pigtail wire. Twist all wires with the together with the needlenose pliers and add a wire nut.
Connect the blue wire to one switch terminal and the brown wire to the other terminal.
Push the wires back into the switch housing and screw on the faceplate.
As you will be working with electricity, if you feel uncertain or uncomfortable at any point during the work, contact a professional. As with any project, make sure to wear safety gear like goggles.