Brief: Imagine you're working on some important excel files and gradually your taskbar is full of open workbooks. Some have similar names (not same ofcourse) and now you want to close all the saved workbooks and want unsaved workbooks to remain open. This macro will definitely solve your purpose.
Dim myWorkBook As Workbook
On Error Resume Next
For Each myWorkBook In Application.Workbooks
'IF WORKBOOK IS SAVED
If myWorkBook.Saved = True Then
'THEN CLOSE IT
NextOn Error GoTo 0