+ Reply to Thread
Results 1 to 2 of 2

Update Format of cells in multiple worksheets

  1. #1
    AliH
    Guest

    Update Format of cells in multiple worksheets

    I have a number of worksheets - all the same layout. There are 3 cells that
    I wish to be formatted to Number, 2 decimal places and comma separator eg
    1,200.00

    Is it possible to do this automatically? if yes how?



  2. #2
    Norman Jones
    Guest

    Re: Update Format of cells in multiple worksheets

    Hi AliH,

    One way:

    '============================>>
    Public Sub TryIt()

    Dim wb As Workbook
    Dim sh As Worksheet
    Dim arr As Variant
    Dim i As Long

    arr = Array("Sheet1", "Sheet2", "Sheet4") '<<=== CHANGE

    For i = LBound(arr) To UBound(arr)
    Sheets(arr(i)).Range("A10").NumberFormat = "0.00"
    ' <<===== CHANGE RANGE
    Next

    End Sub
    '<<========================


    ---
    Regards,
    Norman



    "AliH" <[email protected]> wrote in message
    news:%[email protected]...
    >I have a number of worksheets - all the same layout. There are 3 cells
    >that
    > I wish to be formatted to Number, 2 decimal places and comma separator eg
    > 1,200.00
    >
    > Is it possible to do this automatically? if yes how?
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1