1. turn the breaker off and make sure no wire is hot
2. disconnect both switches, separate wires, cap each black, red, white wire
separately
3. turn the breaker on
4. test which wire group is hot, that is your incoming, mark it with tape or
label
5. turn breaker off, make sure no wire is hot
6. connect red and black on your fan side, use a multimeter to test for
continuity on the switch box side. if a black/red pair is continuous, that
group is the jumper going into the fans. mark the wire going into the fan
with a different color tape or label it. ***remember to disconnect the black
and red for continuity testing***
7. the final unmarked wire group is either abandoned or going else where. if
abandoned, cap black/red/white *separately* and wrap them inside. if not,
figure out where it goes to. there is a good chance the "abandoned" wire is
a traveler wire to another switch. that is, the fan can be controlled by 3-
way switches from two places
8. now it should be pretty obvious how to connect the two switches for the
fan