Factory reset not working in Samsung Tab 2
Try resetting through Recovery mode. if you have installed a custom recovery like philz or CWM try wiping dalvik cache and user data before Factory Reset.it will prepare a clean ROM for you to proceed.

hope it helps.