VBA for matching Credit Card Refunds

CellMaster

New Member
Joined
Jul 1, 2024
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
1. This page is the original data.

1719853229610.png


2. This should be the output after running the VBA.
1719853869013.png



I have already made a VBA to fomat Column E to remove the EUR from the 1,80 EUR. I came close to figuring it out, but after some days of searching and trying I am stuck. The amount left over is the currency loss due to the change in EUR/USD price from the time of the purchase and the time of refund. Does anyone have any ideas? Would be grateful.

Thanks.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Not sure if you're saying your code attempt works or not. Perhaps you need a combination of Left and Instr functions, like

Left("1,80 EUR",instr("1,80 EUR"," ")-1)

You didn't post the code so I'll leave it to you to figure out what to replace "1,80 EUR" with. Maybe a range reference.
 
Upvote 0
Not sure if you're saying your code attempt works or not. Perhaps you need a combination of Left and Instr functions, like

Left("1,80 EUR",instr("1,80 EUR"," ")-1)

You didn't post the code so I'll leave it to you to figure out what to replace "1,80 EUR" with. Maybe a range reference.
Hi, yes the vba for removing the EUR from the number is working. What I haven’t been able to figure out is how grab the matching transactions (the charge and refund) and copy them to a new cell and calculate any currency loss.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top