Output Selected Cell Row and Column

Hello,
I have been searching all morning for the method to output the row and column reference of a selected cell.
I'm sure i have done it before with a simple expression along the lines of row(Selection)= MyRow
But this does not seem to work.
The cell is selected using a range command from a user input i.e. "A1"
I wish to be able to get the row part of this separately so I can manipulate an offset function I am using.
(I only wish to offset the cell when the row number is greater than 200)

Thanks in advance

Stu

Comments

  • : Hello,
    : I have been searching all morning for the method to output the row and column reference of a selected cell.
    : I'm sure i have done it before with a simple expression along the lines of row(Selection)= MyRow
    : But this does not seem to work.
    : The cell is selected using a range command from a user input i.e. "A1"
    : I wish to be able to get the row part of this separately so I can manipulate an offset function I am using.
    : (I only wish to offset the cell when the row number is greater than 200)
    :
    : Thanks in advance
    :
    : Stu
    :

    Hi,
    if you want know where is currently selected area, you can use
    Selection
    .Row - to get first row
    .Column - to get first column (this is enought when you care about one cell)
    .Rows collection to get enumeration of rows in square
    .Column collection to get enumeration of columns in selected square..
    and if you have several selected areas, you can use
    .Areas collection to access each (and properties above)

    When you want to change current selection, use .Select method for this
    Range("SomeAdressRange").Select

    Hope this helps..

    btw, thanks for your comment on prev. topic "help".. you're right!

    [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]

    [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]


  • : : Hello,
    : : I have been searching all morning for the method to output the row and column reference of a selected cell.
    : : I'm sure i have done it before with a simple expression along the lines of row(Selection)= MyRow
    : : But this does not seem to work.
    : : The cell is selected using a range command from a user input i.e. "A1"
    : : I wish to be able to get the row part of this separately so I can manipulate an offset function I am using.
    : : (I only wish to offset the cell when the row number is greater than 200)
    : :
    : : Thanks in advance
    : :
    : : Stu
    : :
    :
    : Hi,
    : if you want know where is currently selected area, you can use
    : Selection
    : .Row - to get first row
    : .Column - to get first column (this is enought when you care about one cell)
    : .Rows collection to get enumeration of rows in square
    : .Column collection to get enumeration of columns in selected square..
    : and if you have several selected areas, you can use
    : .Areas collection to access each (and properties above)
    :
    : When you want to change current selection, use .Select method for this
    : Range("SomeAdressRange").Select
    :
    : Hope this helps..
    :
    : btw, thanks for your comment on prev. topic "help".. you're right!
    :
    Thanks for your help,
    I thought I had tried this many times throughout the morning however i am obviously going quite mad.. I guess programming can do that to a guy..

    Have a good one, I hope I can help you in the future

    Stu
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories