I was able to get a function M(phi) which works, but what I really need is phi(M) of an integral I need to perform on phi.
Its the othe way round, isn't it? In your sheet you have phi(M) and are asking for M(phi)
I can't test it without the Excel data but the attached file should help finding the inverse function(s).
I haven't looked at your various calculations before or where the data vectors come from - I just worked from the definition of your function phi_curve depending on the two vectors M_sort1 and Phi_sort1 and simply switched those vectors. Hope thats what you need.
Also showed how to get the inverse of any function using a solve block.