• Column Name (Excel2003)

    Author
    Topic
    #417556

    Hi!
    I need to get Name of the Columns.
    What is the property for it?
    I can get a number but I need name

    am using
    lColumnCount = Sheets(i)..CurrentRegion.Columns.Count
    It gives me 34 Columns and I need to find last column’s Name.
    Is there way?

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #937140

      Like this:

      Option Explicit

      Sub test()
      Dim iCol As Integer
      Dim sAddr As String
      iCol = 34
      sAddr = ActiveSheet.Cells(1, iCol).Address
      MsgBox Mid(sAddr, 2, InStr(2, sAddr, “$”) – 2)
      End Sub

    Viewing 0 reply threads
    Reply To: Column Name (Excel2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: