Never really used it myself, but have a look at the man page for fc
This appears to enable you to specify particular ranges of commands from history, but as I say, I've never used it, so can't guarantee whether it's useful to your circumstances. HTH.