I have 2.5 bedrooms above my garage which have cold floors. Would like to insulate garage ceiling with spray foam but don't know which spray foam would be best suited for this application. Also don't know what R value this application would render - suspect I need R value of at least 20 - is spray foam suitable or other type of insulation warranted? Help!!!

Am also thinking of re-insulating attic as I do believe I need ventilation there as well. Is spray foam suitable for an attic too? Again, type and R value are questions I would like answers to.

THANKS!!