If you try to use the Logitech and they don't have the codes they will instruct you to use the original remote to teach them into their database. That's how they add IR codes to it.
If you can find someone selling the same Madrid and they allow you to return it you can use the working remote to program the Logitech and send it back.