PDA

View Full Version : VBA Code for Custom No. Formatting



Oh!Calcutta
03-04-2014, 11:09 PM
Hi Excellers!

Could you please help me by providing the VBA Codes for the following Custom No. Formats?

(1) ##\,##\,##\,##0.00;[<-999999](##\,##\,##0.00);##,##0.00

(2) #,##0.00,

(3) #,##0.00,,

(4) #,##0.00,,,


Thanks & Regards.

Excel Fox
03-04-2014, 11:37 PM
Is this what you are looking for?


Range("A1").NumberFormat = "##\,##\,##\,##0.00;[<-999999](##\,##\,##0.00);##,##0.00"

Oh!Calcutta
03-05-2014, 07:54 AM
Is this what you are looking for?


Range("A1").NumberFormat = "##\,##\,##\,##0.00;[<-999999](##\,##\,##0.00);##,##0.00"


Thank you very much.

As for my query, this format specifies Col A. but I want any col. as per my requirements to be formatted as above. Similarly, formats for other 3 may please be given likewise (in hundred thousand my sl. no.2; in Millions my sl. no.3 and in Billions my sl. no.4) in Excel 2010.

Regards.