0

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 1

0

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 ¥"
3
  • How did you insert a ¥ character inside VBA code? How is it possible? When I paste the character it automatically converts to Y
    – Avtem
    Commented 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.
    – harrymc
    Commented Nov 15, 2021 at 8:37
  • Yes it makes difference, that's why i pointed out that question is related to Excel 2013
    – Avtem
    Commented Nov 21, 2021 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .