The below VBA in MS Access is run to format my Excel sheet. However, it is formatting to Number with 2 decimal places. How do I specify that I want 0 decimal places?
wb.Sheets(1).Range("K:AD").Formula = wb.Sheets(1).Range("K:AD").Value
wb.Sheets(1).Range("K:AD").NumberFormat = "Number"
Round a number up by using the ROUNDUP function. It works just the same as ROUND, except that it always rounds a number up. For example, if you want to round 3.2 up to zero decimal places: =ROUNDUP(3.2,0) which equals 4.
wb.Sheets(1).Range("K:AD").NumberFormat = "0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With