So you've migrated your data to a new computer, or restored your music from a backup, but some files are missing. iTunes doesn't have a good way of sorting your library by which files are missing—but this workaround will.
When your whole library goes missing, you probably just have to re-direct iTunes to the correct folder. And if your missing tracks are ones you didn't want anyway, you can just remove them. But what if half your library goes missing and you want to know what those tracks are, so you can buy, rip, or download them again?
This seems like a bit of a niche situation, but my fiancee and I recently went through this (with no explanation as to where the files went—it's a mystery for now). Thankfully, I found an easy solution:
Create a playlist in iTunes and call it whatever you want (I called mine "existing songs").
Go to your "All Songs" view, select your entire library, and drag it into the "existing songs" playlist. iTunes will not add missing songs to this playlist, which means "existing songs" will only include songs without an exclamation point.
Create a new smart playlist with the rule "Playlist is not existing songs". Name it whatever you want (like "Exclamation").
The resulting smart playlist should give you a sortable list of every song missing from your library. From there, you can try to find them, re-download them, or delete them as you see fit.
Finding the Little Exclamation Marks in iTunes | Tom's Blog