Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I get the current cursor position in a spreedsheet

I'm wanting to use the current cursor position in a formula but have looked
at all the possibles like ROW, CELL, INFO with no luck.... but yet I can see
it right there in the NAME BOX... just can't get at it !!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default how do I get the current cursor position in a spreedsheet

Hi Paul J

Selection.Column will give you the column number of the selected cell
Selection.Row will give the row number
ActiveCell.Address will give the absolute cell address i.e. "$A$1"

"Paul J" <Paul wrote in message
...
I'm wanting to use the current cursor position in a formula but have

looked
at all the possibles like ROW, CELL, INFO with no luck.... but yet I can

see
it right there in the NAME BOX... just can't get at it !!!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I get the current cursor position in a spreedsheet

Ah... just tried it... also had to learn VB to do it !!!
unfortunately I wanted somthing that would continue to update as I move the
cursor around :(

"bigwheel" wrote:

Hi Paul J

Selection.Column will give you the column number of the selected cell
Selection.Row will give the row number
ActiveCell.Address will give the absolute cell address i.e. "$A$1"

"Paul J" <Paul wrote in message
...
I'm wanting to use the current cursor position in a formula but have

looked
at all the possibles like ROW, CELL, INFO with no luck.... but yet I can

see
it right there in the NAME BOX... just can't get at it !!!!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default how do I get the current cursor position in a spreedsheet

The closest standard function that gives what you ask is the Cell function.
However, it only updates when there is a change in the worksheet that
triggers a recalc, not when the cursor position changes.

=Cell("Address")

This will return the address of the active cell when a recalc takes place.
When you enter data or press F9, for example.

You could also write your own function in VBA code that uses
ActiveCell.Address to return the cursor address. However, you would need to
declare the function Volatile and it also would only update on a recalc.

The only way to trap the cursor address when it changes is to write code for
the SelectionChange event.

"Paul J" <Paul wrote in message
...
I'm wanting to use the current cursor position in a formula but have

looked
at all the possibles like ROW, CELL, INFO with no luck.... but yet I can

see
it right there in the NAME BOX... just can't get at it !!!!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default how do I get the current cursor position in a spreedsheet

thank you both for your replies... it's appreciated.

"John Green" wrote:

The closest standard function that gives what you ask is the Cell function.
However, it only updates when there is a change in the worksheet that
triggers a recalc, not when the cursor position changes.

=Cell("Address")

This will return the address of the active cell when a recalc takes place.
When you enter data or press F9, for example.

You could also write your own function in VBA code that uses
ActiveCell.Address to return the cursor address. However, you would need to
declare the function Volatile and it also would only update on a recalc.

The only way to trap the cursor address when it changes is to write code for
the SelectionChange event.

"Paul J" <Paul wrote in message
...
I'm wanting to use the current cursor position in a formula but have

looked
at all the possibles like ROW, CELL, INFO with no luck.... but yet I can

see
it right there in the NAME BOX... just can't get at it !!!!






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
Function to determine current cursor position? Dan Excel Worksheet Functions 1 March 12th 09 02:56 PM
How do you set cursor position at current date in macro? Tom Robertson Excel Worksheet Functions 1 May 28th 06 03:50 PM
Cursor position saziz Excel Discussion (Misc queries) 2 August 9th 05 08:19 PM
Identifying cursor in active spreedsheet C Ambrose Excel Worksheet Functions 9 May 24th 05 11:36 PM
cursor position Fan Fan Excel Programming 3 August 14th 04 01:12 AM


All times are GMT +1. The time now is 05:46 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"