Results 1 to 4 of 4

Thread: apply NumberFormat

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Senior Member
    Join Date
    Oct 2011
    Posts
    135
    Rep Power
    14
    Hello

    Thanks for the suggestions, here is an example code.
    The formatting used automatically adapts to the width of the column

    Code:
    Option Explicit
    
    Sub Test()
        Dim K       As Long
        Dim DD      As Long
        For K = 0 To 12
              DD = Date + K
              Cells(K + 2, 1).Value = UCase(Format(DD, "dddd"))
              Cells(K + 2, 1).NumberFormat = "#,##0_-;-#,##0_-;;   @* _- """ & Day(DD) & """    "
        Next K
    End Sub
    Attached Files Attached Files

Similar Threads

  1. [For Loop] Apply Exchange Rate Calculation to Cells
    By nsturk725 in forum Excel Help
    Replies: 1
    Last Post: 05-30-2015, 12:02 AM
  2. Apply filter and delete rows thru Messege Box
    By Prabhu in forum Excel Help
    Replies: 11
    Last Post: 11-04-2014, 07:35 AM

Posting Permissions

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