RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a number: -300.565181720644
I need to output from my VBA code as 'scientific' format (##0.0E+0)
I've found that if I format a cell to ##0.0E+0, the vba outputs to the sheet: -300.6E+0 which is correct
but if I try and format the number within VBA (and not save to cell in sheet) using:
I get just -300
or if I use
I get -300.6
How can I get this to output from VBA to get the result of -300.6E+0 ?
If you can point me in the right direction, I'd be very grateful
Thanks
Rob
I need to output from my VBA code as 'scientific' format (##0.0E+0)
I've found that if I format a cell to ##0.0E+0, the vba outputs to the sheet: -300.6E+0 which is correct
but if I try and format the number within VBA (and not save to cell in sheet) using:
Code:
Format(-300.565181720644, "Scientific")
I get just -300
or if I use
Code:
Format(-300.565181720644, "##0.0E+0")
I get -300.6
How can I get this to output from VBA to get the result of -300.6E+0 ?
If you can point me in the right direction, I'd be very grateful
Thanks
Rob