Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default How to obtain the number of Column and Row from selected (active)cell?

Tx

Regards,
Andrzej
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtain row number of active cell Jive Excel Worksheet Functions 4 January 8th 08 01:06 PM
How do I obtain cell information (column/row) from data marker? SHuelin Charts and Charting in Excel 0 June 20th 07 12:59 AM
Random cell/number and dont repeat selected cell/number Hector PR Excel Discussion (Misc queries) 0 October 16th 06 05:02 PM
How do I obtain total for auto filter value selected ? FLo Excel Discussion (Misc queries) 1 November 22nd 05 03:08 PM
how can one obtain the current selected cell value Susan Hayes Excel Programming 3 December 14th 04 10:31 AM


All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"