We had a ceiling fan installed in our kitchen, but we are trying to put in a new one. The light is controlled by a switch on one wall, the fan by a dial on the opposite wall, but they are on the same circuit.

When the ceiling fan came down, there was a mass of wires. There were 4 sets of black and white wires, one set with a neutral wire, coming of the fan box. They are connected wires as follows:

1 black and white wire
2 black and white wire
3 black and two whites (one white seems to have been marked that it is a black -- wrapped in back tape and spliced to a black wire)
4 black, white and neutral

White wires from 1,2,3 are connected with a single white wire coming away. Black wires from 1,2,3,4 all connected together with no wires coming away. The wire from 3 that's wrapped in black tape, is connected to a black wire that coming away. White wire from 4 is not connected to anything. The ground is grounded. That leaves 2 white wires, and one black wire to connect to.

We tried to connect the new ceiling fan to the same wires that the old fan was attached to. The old fan had a black, white blue coming from fan. The black wire was connected to the black wire, the white fan wire connected to white wire, and blue fan wire was connected to the other white wire. The breaker wouldn't stay switched on with this connection. Then, connected the blue wire to the other white wire. The breaker wouldn't stay switched on again.

Can anyone help us figure this out, or should we call an electrician to deal with this mess?

Thanks.