Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Parsing $A$1

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is there an easier way to get the A & 1 from an address of an active cell, without parsing it? Or is there a way to check if the active cell in a column is the next cell below the last cell with data in it?

    Thanks

  2. #2
    Guest

    Default

    Is there an easier way to get the A & 1 from an address of an active cell, without parsing it? Or is there a way to check if the active cell in a column is the next cell below the last cell with data in it?
    You can easily get the row and column number (not the letter) by saying something like:-

    ActiveCell.Row
    ActiveCell.Column

    to check whether the activecell is in the position you state try this:-

    Code:
    Sub IsActiveCellLastCell()
    If Cells(65536, ActiveCell.Column).End(xlUp).Row = ActiveCell.Row - 1 Then
        MsgBox "Active cell is in next available cell in column"
    Else
        MsgBox "Active cell is not in next available cell in column"
    End If
    End Sub
    HTH,
    D

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi John

    You could get the Column letter like:

    Dim strCol As String
    strCol = ActiveCell.EntireColumn.Address(ColumnAbsolute:=False)
    strCol = Left(strCol, InStr(1, strCol, ":", vbTextCompare) - 1)
    MsgBox strCol

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Dave & Anonymous,

    Thanks for your tips. After looking at them, they cleared up alot.

    Thanks again,

    John

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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