So, i want to create a macro that will set selected cells' format to 0,0 ¥
.
However, if you record the steps and then try to run the macro it will set format to 0,0 ?
. Is there a way to fix this?
1 Answer
The recorded macro does not work and does not do what you want.
You need to tweak the VBA code, using the VBA editor, so the format assignment looks more similar to:
Selection.NumberFormat = "#,##0.00 ¥"
-
How did you insert a ¥ character inside VBA code? How is it possible? When I paste the character it automatically converts to Y– AvtemCommented Nov 15, 2021 at 7:18
-
I recorded the macro, as you did, choosing Japan currency, then opened the VBA editor and modified the resulting code. I removed the part inside the square brackets and copy-pasted the ¥ character to the end. I'm using Excel 365, which might make a difference.– harrymcCommented Nov 15, 2021 at 8:37
-
Yes it makes difference, that's why i pointed out that question is related to Excel 2013– AvtemCommented Nov 21, 2021 at 11:38