Yes this upgrade will work. If you are using your pc for games or for anything CPU intensive this will obviously be a good upgrade, however if you are just using your PC for basic stuff like web browsing or more passive softwares like skype or IDE's then it's not really necessary and you'd be better off investing in an SSD (if you don't already have one)
This is just my opinion however.
P.S. Often the higher end processors use more powerful fans so make sure you don't get tempted to buy an i5 without a fan and use the pentiums cooler on it because this often leads to CPU heating problems.