Change French Canadian to US Dollars using VBA

mnh

New Member
Joined
Mar 22, 2024
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello - we frequently spreadsheets completed in Quebec - so it's written in French Canadia. I'm having issues changing the currency from 55,00 $ and 1 555,00 $ to $55.00 and $1,555.00. I am not having any luck changing this to US dollars.
TARIFSÀLA
JOURNÉE
59,00 $
59,00 $
60,00 $
62,00 $


Here is the code:

Union(searchRange, searchRange3).NumberFormat = "$#,##0.00"

Any help would be greatly appreciated! I'm using Excel 365 - Desktop.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
What is the purpose of searchRange and SearchRange3? Why can't you just format the whole column?
Are the $ in there already as text or is it a format?
 
Upvote 0
What is the purpose of searchRange and SearchRange3? Why can't you just format the whole column?
Are the $ in there already as text or is it a format?
The information in imported from a contract onto the sheet, and not all of the columns line up with the same information. For example, Column K can have money amounts in rows 6-30, rows 35-52 are text and rows 54-70 are numbers only.
 
Upvote 0
What is the purpose of searchRange and SearchRange3? Why can't you just format the whole column?
Are the $ in there already as text or is it a format?
Also, the fields that I need to change to US currency are already formatted as Currency - just not US Currency.

1720187298535.png
 
Upvote 0
What happens if you select the cells -> Ctrl + 1 -> Accounting -> Symbol = English (United States)?
 
Upvote 0
Test the cell with =ISNUMBER(cell). Does it return TRUE or FALSE?
 
Upvote 0
Test the cell with =ISNUMBER(cell). Does it return TRUE or FALSE?
Interesting - it's coming back as false! however, checking out the Format on the same cell, it shows Accounting.
 
Upvote 0
Interesting - it's coming back as false
That means you are dealing with Text entries, not numeric ones!
"Numbers entered as text" are NOT the same as valid numeric/date entry.
If you look at an entry in the formula bar, I bet you will see the $ in there, i.e. "59.00 $". So the " $" is literal text in your entry!
If it was a validly entered number, you would not see any currency sign when viewing the data in the formula bar.

however, checking out the Format on the same cell, it shows Accounting.
Since formatting ONLY affects valid number/date entries, they have no effect on Text entries.
You can change the format of those cells all you want, but they will have no impact on how the data is presented.
You need to convert your entries to valid numeric entries to get the cell formatting to apply to it.
 
  • Like
Reactions: mnh
Upvote 0
OK - so I removed the dollar sign,
That means you are dealing with Text entries, not numeric ones!
"Numbers entered as text" are NOT the same as valid numeric/date entry.
If you look at an entry in the formula bar, I bet you will see the $ in there, i.e. "59.00 $". So the " $" is literal text in your entry!
If it was a validly entered number, you would not see any currency sign when viewing the data in the formula bar.


Since formatting ONLY affects valid number/date entries, they have no effect on Text entries.
You can change the format of those cells all you want, but they will have no impact on how the data is presented.
You need to convert your entries to valid numeric entries to get the cell formatting to apply to it.
You are correct - you see the $ in the formula bar! Thank you for pointing this out. So, how do I change this to a number using VBA? I can remove the " $" so I have 50,00 remaining - but from there, I am not sure where to go to change it to 50.00.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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