is the fan remote actually IR? most of them are RF. If it is RF, you won't be able to teach the codes to the URC.
to verify, point your phone camera at the end of the remote and press some buttons on the remote. if you see a flash, it is an IR remote and you should be able to teach the codes.
If you are having trouble teaching the IR codes after confirming the remote actually is IR, there are several techniques to use to get them to learn properly. check out this guide here:
[Link: remotecentral.com]