Yes, you avoid the penalty as long as you
- withdraw the excess contributions from your IRA by the due date of your individual income tax return (including extensions); and
- withdraw any income earned on the excess contribution
If you have more than one account then you can choose where to withdraw the excess amount.