Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default using excel formula to indicate the active cell

Hi all,

is it posible to have a formula in excel that indicates the current
cell?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default using excel formula to indicate the active cell

One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.

A better way to indicate the active cell would be to use an event macro.
Put this in your worksheet code module:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub

Change the range to suit.


In article .com,
thread wrote:

Hi all,

is it posible to have a formula in excel that indicates the current
cell?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default using excel formula to indicate the active cell

Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code
is it posible
i want the formula inside of the cell to indicate what row is it

JE McGimpsey :
One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.

A better way to indicate the active cell would be to use an event macro.
Put this in your worksheet code module:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub

Change the range to suit.


In article .com,
thread wrote:

Hi all,

is it posible to have a formula in excel that indicates the current
cell?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default using excel formula to indicate the active cell

=CELL("address")

Press F9 to update.

On 6 Jun, 08:49, thread wrote:
Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code
is it posible
i want the formula inside of the cell to indicate what row is it

JE McGimpsey :



One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.


A better way to indicate the active cell would be to use an event macro.
Put this in your worksheet code module:


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub


Change the range to suit.


In article .com,
thread wrote:


Hi all,


is it posible to have a formula in excel that indicates the current
cell?- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default using excel formula to indicate the active cell

Hi

If you just want the Row number, as opposed to the cell address as you
posted first, then
=ROW()

--
Regards

Roger Govier


"thread" wrote in message
ups.com...
Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code
is it posible
i want the formula inside of the cell to indicate what row is it

JE McGimpsey :
One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.

A better way to indicate the active cell would be to use an event
macro.
Put this in your worksheet code module:

Private Sub Worksheet_SelectionChange(ByVal Target As
Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub

Change the range to suit.


In article .com,
thread wrote:

Hi all,

is it posible to have a formula in excel that indicates the current
cell?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default using excel formula to indicate the active cell

If you can't use vba code, then a different newsgroup than .programming
would probably have been appropriate.

To get just the row of the active cell, you can use

=ROW(INDIRECT(CELL("address")))

but you'll have to recalculate (F9) in order to have the formula update.
I normally wouldn't use CELL("address") because it will update to the
current active cell address, even if the active cell is on another
worksheet, but perhaps that's what you want.


In article . com,
thread wrote:

Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code
is it posible
i want the formula inside of the cell to indicate what row is it

JE McGimpsey :
One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.

A better way to indicate the active cell would be to use an event macro.
Put this in your worksheet code module:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub

Change the range to suit.


In article .com,
thread wrote:

Hi all,

is it posible to have a formula in excel that indicates the current
cell?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default using excel formula to indicate the active cell

or just:

=CELL("row")


On 6 Jun, 13:23, JE McGimpsey wrote:
If you can't use vba code, then a different newsgroup than .programming
would probably have been appropriate.

To get just the row of the active cell, you can use

=ROW(INDIRECT(CELL("address")))

but you'll have to recalculate (F9) in order to have the formula update.
I normally wouldn't use CELL("address") because it will update to the
current active cell address, even if the active cell is on another
worksheet, but perhaps that's what you want.

In article . com,



thread wrote:
Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code
is it posible
i want the formula inside of the cell to indicate what row is it


JE McGimpsey :
One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation.


A better way to indicate the active cell would be to use an event macro.
Put this in your worksheet code module:


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A1").Value = ActiveCell.Address(False, False)
End Sub


Change the range to suit.


In article .com,
thread wrote:


Hi all,


is it posible to have a formula in excel that indicates the current
cell?- Hide quoted text -


- Show quoted text -



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default using excel formula to indicate the active cell

Yup. Again, same behavior (need F9, updates on other sheets). May work
for OP...


In article .com,
Lori wrote:

or just:

=CELL("row")

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default using excel formula to indicate the active cell

this is the disadvantage that doesnt work for me here,becaouse i want
to use replace function of the windows and place a formula based on
the current cell and the problem is that if i move to another cell,it
will autoticly update all the cells with the current one
any bypass to this problem?

JE McGimpsey :
Yup. Again, same behavior (need F9, updates on other sheets). May work
for OP...


In article .com,
Lori wrote:

or just:

=CELL("row")


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
how to use the active cell in an Excel formula EPMMGR06 Excel Worksheet Functions 3 May 15th 23 07:45 PM
To run the formula from any active cell pol Excel Discussion (Misc queries) 6 July 20th 09 02:09 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
Active Cell To Change Formula PaulW Excel Discussion (Misc queries) 7 September 21st 06 04:03 PM
Excel VBA-use variable in active cell formula problem waveracerr Excel Programming 9 February 6th 04 02:49 PM


All times are GMT +1. The time now is 07:41 AM.

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"