+ Reply to Thread
Results 1 to 4 of 4

Row and Column index for Active Cell

  1. #1
    Registered User
    Join Date
    05-19-2005
    Posts
    5

    Row and Column index for Active Cell

    Hi all,

    How can I get the row and column index for an active cell, and store it as a variable?

    regards
    bala

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Bala

    This code should do the trick:

    Sub Example()
    usrcell = ActiveWindow.RangeSelection.Address
    a = Range(usrcell).Row
    b = Range(usrcell).Column
    MsgBox "Row : " & a & Chr(13) & "Column : " & b
    End Sub

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    05-19-2005
    Posts
    5
    Many thanks Mr dominic
    It works

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi Bala

    Certainly does. Appreciate the feedback.

    DominicB

+ 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