Application.WorksheetFunction.Round

Maurizio

Well-known Member
Joined
Oct 15, 2002
Messages
691
Office Version
  1. 2007
Platform
  1. Windows
Hi all,
what's the difference between:

1] … Centesimi = Application.WorksheetFunction.Round((Numero - Interi) * 100, 0)
AND
2] …Centesimi = Round((Numero - Interi) * 100, 0)

…?

Tia.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
This question because I have seen that with excel 97 often:

Code:
Centesimi = Round((Numero - Interi) * 100, 0)
give me error, not with:

Code:
Centesimi = Application.WorksheetFunction.Round((Numero - Interi) * 100, 0)

Bye
 
Upvote 0
Ahh.. I see where you're going. VBA's round is part of VB 6, which is in Excel 2000 and XP, not in 97... the same problem with Replace, Split, AddressOf, and other functions. So, try using the WorksheetFunction one then if you need compatibility with 97.
 
Upvote 0

Forum statistics

Threads
1,221,695
Messages
6,161,360
Members
451,699
Latest member
sfairbro

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