Consulting

Results 1 to 3 of 3

Thread: Controlling the number formats in a file

  1. #1

    Controlling the number formats in a file

    Hi,

    I am sick and tired of fixing exotic number formats created by other people.

    Is there a way to control the number formats allowed in an Excel file?

    Thanks.

  2. #2
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    269
    Location
    Musicgold,
    If you just want one numberformat across all cells, easy way would be on workbook open to format the cells the way you want. If not, you could certainly break it down to smaller ranges and make sure they are formatted that way each time the workbook is opened, or even just fix them all when you run a macro yourself with 1 click...

    [vba]Private Sub Workbook_Open()
    Sheet1.Cells.NumberFormat = "0.00"
    End Sub[/vba]

  3. #3
    Thanks CodeNinja.

    That would be too restrictive. What I would ideally like to do is to be able allow only, say, five number formats in the sheet. The user has to choose his number formats from those five. Is it possible?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •