Unfortunately, no — once a code is redeemed to a Microsoft account, Microsoft's policy is that the funds are non-transferable. They're locked to that account and can't be moved to another account, refunded, or converted to cash.
If the redemption was very recent (within the last few hours or day), a support agent may be able to reverse it as a one-time courtesy, especially if you explain it was a mistake. Go to support.microsoft.com and start a live chat — phone or chat agents have more flexibility than the automated systems. Be polite and upfront that it was an accidental redemption.