If you have received a refund for a purchase direct to your bank account the best way to allocate this transaction is to categorise the cash received to the same category where the original expense was incurred.
For example if the original expense was for Office Supplies and you have subsequently received a refund for this amount, then by classifying the refund to Office Supplies the impact of that transaction is countered.