A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

return the row of any selected cell



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2009, 12:07 AM posted to microsoft.public.excel.misc
kim55
external usenet poster
 
Posts: 2
Default return the row of any selected cell

I want to be able to see in a cell the row number of any other currently
selected cell.
  #2  
Old November 14th, 2009, 01:30 AM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default return the row of any selected cell

Namebox not adequate?

Try this UDF if not.

Function WhatCell()
Application.Volatile
WhatCell = ActiveCell.Address
End Function

NOTE: you must force a recalculation before it will update.

F9 key will calculate. Or F2 then Enter


Gord Dibben MS Excel MVP


On Fri, 13 Nov 2009 16:07:01 -0800, kim55
wrote:

I want to be able to see in a cell the row number of any other currently
selected cell.


  #3  
Old November 15th, 2009, 02:32 AM posted to microsoft.public.excel.misc
kim55
external usenet poster
 
Posts: 2
Default return the row of any selected cell

Thanks, Gord, that is a great function and i'm using it but having to
manually recalc is a pain. I'm trying to use conditional formatting in a cell
depending on what other cell is active, so the namebox isn't helpful. That is
unless there is a way to pull the info from the namebox.

"Gord Dibben" wrote:

Namebox not adequate?

Try this UDF if not.

Function WhatCell()
Application.Volatile
WhatCell = ActiveCell.Address
End Function

NOTE: you must force a recalculation before it will update.

F9 key will calculate. Or F2 then Enter


Gord Dibben MS Excel MVP


On Fri, 13 Nov 2009 16:07:01 -0800, kim55
wrote:

I want to be able to see in a cell the row number of any other currently
selected cell.


.

  #4  
Old November 15th, 2009, 06:29 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default return the row of any selected cell

Maybe some sheet event code?

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


Gord

On Sat, 14 Nov 2009 18:32:01 -0800, kim55
wrote:

Thanks, Gord, that is a great function and i'm using it but having to
manually recalc is a pain. I'm trying to use conditional formatting in a cell
depending on what other cell is active, so the namebox isn't helpful. That is
unless there is a way to pull the info from the namebox.

"Gord Dibben" wrote:

Namebox not adequate?

Try this UDF if not.

Function WhatCell()
Application.Volatile
WhatCell = ActiveCell.Address
End Function

NOTE: you must force a recalculation before it will update.

F9 key will calculate. Or F2 then Enter


Gord Dibben MS Excel MVP


On Fri, 13 Nov 2009 16:07:01 -0800, kim55
wrote:

I want to be able to see in a cell the row number of any other currently
selected cell.


.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.