Solution that worked for me. First, this is for the late 2011 Mac
After doing a software update for Office 2011, my mac got stuck on the start up with the logo and spinning wheel.
Power down you macbook. Now press and hold the "Option" key and the Power button at the same time until a screen comes up with two icons: one that says "macintosh HD" and another that says "recovery HD"
Press on Recovery HD. Then when the utilities screen comes up, click on "reinstall Mac OS X"
You will see a progress bar that says it will take about 16 hours.
Just leave our monitor in the open position.
The next morning, I clicked the trackpad and my screen was black. Then I clicked on F2 to increase the brightness and there was my desktop!
I powered it down again just to make sure it would reboot correctly and it did.
Hope this helps!