Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set NumberFormat to Number with 0 decimal places

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"
like image 677
Bruno Avatar asked Nov 16 '11 15:11

Bruno


People also ask

How do I format 0 decimal places in Excel?

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.


1 Answers

 wb.Sheets(1).Range("K:AD").NumberFormat = "0"
like image 150
paulmorriss Avatar answered Sep 27 '22 20:09

paulmorriss