ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ROUNDing on a MAC - conversion error (https://www.excelbanter.com/excel-programming/333312-rounding-mac-conversion-error.html)

Lokai

ROUNDing on a MAC - conversion error
 

ROUNDing on a MAC - error

If Round(c, 2) < c Then c.Value = Round(c.Value, 2)

The macro above works fine in Windows but is hanging on a Macintosh.

Specifically I get an error "Compile Error: Sub or Function no
defined" when I use this Round function on a Mac - it thinks Round(x,2
is calling a sub or function.

Is there a way around this? (no pun intended)
I don't have easy access to Mac for testing.

(I did post at mrexcel but it has dropped to the 4th page with n
response

--
Loka
-----------------------------------------------------------------------
Lokai's Profile: http://www.excelforum.com/member.php...fo&userid=2479
View this thread: http://www.excelforum.com/showthread.php?threadid=38358


Mike Middleton[_4_]

ROUNDing on a MAC - conversion error
 
Lokai -

Current versions of Windows Excel have a newer version of VBA than current
versions of Mac Excel.

The current versions of Mac Excel do not have a VBA Round function.

Perhaps you could use application.worksheetfunction.round so that it will
work on both platforms.

If you need further advice about Mac issues, you may want to try the
microsoft.public.mac.office.excel newsgroup.

- Mike
www.mikemiddleton.com

"Lokai" wrote in
message ...

ROUNDing on a MAC - error

If Round(c, 2) < c Then c.Value = Round(c.Value, 2)

The macro above works fine in Windows but is hanging on a Macintosh.

Specifically I get an error "Compile Error: Sub or Function not
defined" when I use this Round function on a Mac - it thinks Round(x,2)
is calling a sub or function.

Is there a way around this? (no pun intended)
I don't have easy access to Mac for testing.

(I did post at mrexcel but it has dropped to the 4th page with no
response)


--
Lokai
------------------------------------------------------------------------
Lokai's Profile:
http://www.excelforum.com/member.php...o&userid=24796
View this thread: http://www.excelforum.com/showthread...hreadid=383581




Lokai[_2_]

ROUNDing on a MAC - conversion error
 

Thank you Mike, that did the trick

--
Loka
-----------------------------------------------------------------------
Lokai's Profile: http://www.excelforum.com/member.php...fo&userid=2479
View this thread: http://www.excelforum.com/showthread.php?threadid=38358



All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com