Results 1 to 3 of 3

Macro (Center text)

Threaded View

PRodgers Macro (Center text) 08-25-2009, 06:46 AM
DonkeyOte Re: Macro (Center text) 08-25-2009, 06:51 AM
PRodgers Re: Macro (Center text) 08-25-2009, 07:04 AM
  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Macro (Center text)

    I have a macro that output a month based upon a date that has been entered in a row on my spreadsheet. I want the macro to center the text but im not sure of the syntax, the macro code is below:

    Sub calculateMonthRegistered()
    
    ' Lr = "Last Row"
        
        Dim Lr As Long
         
        Lr = Range("J" & Rows.Count).End(xlUp).Row
        
    'Refers to Cells 1 = "1" and 3 = Column "C"
         
        With Cells(2, 43).Resize(Lr - 1, 1)
            .Formula = "=TEXT(J2,""mmm-yy"")"
            .Font.ColorIndex = 3
            .Font.Bold = True
        End With
         
    End Sub
    Can anyone help
    Last edited by PRodgers; 08-25-2009 at 07:05 AM.

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