How do you wire two separate bathrooms in order to have the bathroom lights work independently while being able to turn on the single inline duct fan?I have two bathrooms. The bathroom vents have two separate ducts that eventually lead to a single duct with an exhaust fan on the sing duct. I want to be able to turn on the bathroom lights independently from one another while being able to turn on the single exhaust fan from either bathroom. Each bathroom will have a single light switch. Each bathroom light switch should turn on its individual bathroom light and the single duct Fan. I want each switch to work for its bathroom only and not the wired to be able to control the other bathroom light. I have access to run all new electric including wires and there is nothing installed currently.
This is very similar to a question I answered here. Use DPST switches, such as those intended for water heaters.
Note that this solution already contemplates the issue of the ligths/fan not all being on the same circuit.
It does not consider having the switches some distance apart. No matter; one of them will be a switch loop.
Why can't you use two three-way switches for each room to operate the fan? If you have your hot terminated on on three-way switch in the first bathroom, then run two travelers to the next three-way switch in the second bathroom, then run your hot to the bath fan. You can then operate the fan in both bathrooms independently of the lights, and each light can be on or off independently of each other. If you only have room for two gang boxes they make switches that are horizontal and stack two in the space of a single gang box.
You just need two switches in each bathroom. One controls the light, one powers the fan. The fan wiring is such that if either switch is on, the fan is on. This is just wiring two switches in parallel. Of course the two fan switches must be on the same circuit.
These should not be 3-way switches, because it's probably not the case that you'd want to be able to toggle the fan on/off from either bathroom. In fact, if the fan is quiet, you might not even know if it's on or off, and with 3-way switches you wouldn't be able to see that unless you physically looked at both switches. So instead, wire it with simple switches so that if the switch in either bath is on, the fan is on.
As mentioned in other responses, you can get a double pole switch (which packages two switches in a single fixture), but it's not clear if you even need that. You might also consider using a timer or occupancy sensor to control the fan.