I have a UDF for this. Give fnRemapShare() a try.