How to convert Pounds to Euros VBA?

Asked

Viewed 62 times

0

CONVERSION:
The conversion will be in Pounds x 1.17 = Value in Euros.
To add a percentage the formula will be Pounds x 1.17 x (1 + percentage).

METHOD APPLIED:
Replacement of the £200 column.50 to 250,50 and then I apply the formula.

I intend the final value to be with . and not ,, any idea?

  • In fact if you use a separator Excel will use this same configuration for all your spreadsheets... so if you want to use 1.17, you could use 1.17 and do the calculation, without having to convert or change the type of separator... I answered and rethought your question.. that if it is the doubt of how to change the separator in VBA ai is, if that is, could update the question to be clearer. Abs and good luck!

1 answer

0


To change these settings in VBA use the function below, changing as you wish:

Sub mudaSeparador() 

 Range("A1").Formula = "1,234,567.89" 

 ' Defina os separadores que deseja
 Application.DecimalSeparator = "-" ' > Separador para decimal
 Application.ThousandsSeparator = "-" ' > Separador para milhar
 Application.UseSystemSeparators = False 

End Sub

I hope I’ve helped!

Ref: https://msdn.microsoft.com/pt-br/library/office/ff195207.aspx

  • I changed the decimal setting in Control Panel > Region and Language > Additional Settings > Decimal Separator.

  • But without a doubt @Evert, that way it becomes easier to carry the book.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.