+ Reply to Thread
Results 1 to 4 of 4

How to obtain the number of Column and Row from selected (active)cell?

  1. #1
    And1
    Guest

    How to obtain the number of Column and Row from selected (active)cell?

    Maybe this stupid, but it will add me in sure project.

    For example, select mouse any cell, and
    I want, to :

    Cells("A1").Value = Row
    Cells("A2").Value = Col
    ' dim Row, Col as Integer
    but,
    Row = ???? (I don't know)
    Col = ???? (I don't know)

    Regards,
    Andrzej

  2. #2
    Brian
    Guest

    Re: How to obtain the number of Column and Row from selected (active) cell?

    Try

    rowId = Range(ActiveCell.Address).Row
    colId = Range(ActiveCell.Address).Column




    "And1" <[email protected]> wrote in message
    news:eRnoOtb#[email protected]...
    > Maybe this stupid, but it will add me in sure project.
    >
    > For example, select mouse any cell, and
    > I want, to :
    >
    > Cells("A1").Value = Row
    > Cells("A2").Value = Col
    > ' dim Row, Col as Integer
    > but,
    > Row = ???? (I don't know)
    > Col = ???? (I don't know)
    >
    > Regards,
    > Andrzej




  3. #3

    Re: How to obtain the number of Column and Row from selected (active) cell?

    Sub y()
    Range("A1") = Selection.Row
    Range("A2") = Selection.Column
    End Sub

    On Mon, 05 Dec 2005 17:48:04 +0100, And1 <[email protected]> wrote:

    >Maybe this stupid, but it will add me in sure project.
    >
    >For example, select mouse any cell, and
    >I want, to :
    >
    >Cells("A1").Value = Row
    >Cells("A2").Value = Col
    >' dim Row, Col as Integer
    >but,
    >Row = ???? (I don't know)
    >Col = ???? (I don't know)
    >
    >Regards,
    >Andrzej



  4. #4
    And1
    Guest

    Re: How to obtain the number of Column and Row from selected (active)cell?

    Tx

    Regards,
    Andrzej

+ 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