Well, I did it for different reasons... I went from a 30 year @ 6.375% to 15 year @ 5.0% and then... to a 15 year @ 3.375%. The interest savings compensated for the closing costs quickly.
Now I considered the opposite... refinance back out to 30 to invest, but the leap in interest rate on the entire principal just seemed to be too much loss to overcome. (On a long enough timeline, it would be better, assuming historical returns...)
Buying a house now, and going with 3.75% 30 year rather than 3.125% 15 year... In this case I want to invest the difference from the beginning!