Formerly Best Training
© 2024 STL. All Rights Reserved.
All prices offered for business users and exclude VAT. E&OE
2nd Floor, CA House, 1 Northey Street, Limehouse Basin, London, E14 8BT. United Kingdom
Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA: Number format and screen zoom
Resolved · Low Priority · Version 2003
Simon has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
During the course, when the columns were autofit and the zoom was set to 75, some numbers were presented in scientific notation. This did not happen if the Zoom was a higher number. Why sgould the zoom affect the number format?
Hi Simon. I think you have put your finger on an Excel bug! There are some reports of data pasted into a cell - that's already been specifically formatted - refusing to display in that format. Excel has a fifteen digit limit, after which it tries to reformat the number into scientific notation to deal with it (and, indeed, render it on the screen) more easily. The zoom function often causes (and solves) some rendering artefacts on the screen, and it may be on a zoom to 75% Excel "sees" a large number and reformats it into scientific notation. Personally, I've never encountered a situation which would require this as a design feature in Excel!
Try reformatting the cell as Numbers with 0 decimal places and see if that stops the reformatting. Beyond that, a work around - involving sticking the data in another worksheet and bringing it into the master sheet by links, in my opinion - might be worth investigating.
Hope this helps,
Anthony
Thanks Anthony.
Fortunately, this issue is not repeated when I run the code on my work PC or my home PC. As it occurred only in the training environment it is not something that I need to resolve.
Nonetheless, I will file your reply in case it should ever crop up. I wonder if another possible resolution is simply to write the code in a different order so that the format instructions occur at a relatively different time to the data instructions.
Sadly, or perhaps not, until I can recreate the bug, I cannot test the theroretical fix!
Cheers,
S!
|
Excel tip:Shared Conditional FormattingIn a shared workbook, conditional formats applied before the workbook was shared will continue to work; however you cannot modify the existing conditional formats or apply new ones. |
We'll call during UK business hours
Server loaded in 0.09 secs.