Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Offset of active cell

Help please. How do I find the offset of the active cell from the top left
cell in a named range?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Offset of active cell

Maybe you mean
activecell.Row-range("rngname").Row
activecell.Column-range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Help please. How do I find the offset of the active cell from the top left
cell in a named range?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Offset of active cell

Hi Stefi

Thanks for the suggestion. It seems that RowRange and ColumnRange only apply
to Pivot Tables. I can't get your code to work for a worksheet range.

Best wishes

Richard

"Stefi" wrote:

Maybe you mean
activecell.Row-range("rngname").Row
activecell.Column-range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Help please. How do I find the offset of the active cell from the top left
cell in a named range?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Offset of active cell

You misunderstood my post, it has nothing to do with RowRange and ColumnRange.
Subtract range("rngname").Row from activecell.Row for row offset and
subtract range("rngname").Column from activecell.Column for Column offset:

activecell.Row - range("rngname").Row
activecell.Column - range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Hi Stefi

Thanks for the suggestion. It seems that RowRange and ColumnRange only apply
to Pivot Tables. I can't get your code to work for a worksheet range.

Best wishes

Richard

"Stefi" wrote:

Maybe you mean
activecell.Row-range("rngname").Row
activecell.Column-range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Help please. How do I find the offset of the active cell from the top left
cell in a named range?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Offset of active cell

Many thanks, Stefi

With your help, I've solved it.

Best wishes

Richard

"Stefi" wrote:

You misunderstood my post, it has nothing to do with RowRange and ColumnRange.
Subtract range("rngname").Row from activecell.Row for row offset and
subtract range("rngname").Column from activecell.Column for Column offset:

activecell.Row - range("rngname").Row
activecell.Column - range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Hi Stefi

Thanks for the suggestion. It seems that RowRange and ColumnRange only apply
to Pivot Tables. I can't get your code to work for a worksheet range.

Best wishes

Richard

"Stefi" wrote:

Maybe you mean
activecell.Row-range("rngname").Row
activecell.Column-range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Help please. How do I find the offset of the active cell from the top left
cell in a named range?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Offset of active cell

You are welcome! Thanks for the feedback!
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Many thanks, Stefi

With your help, I've solved it.

Best wishes

Richard

"Stefi" wrote:

You misunderstood my post, it has nothing to do with RowRange and ColumnRange.
Subtract range("rngname").Row from activecell.Row for row offset and
subtract range("rngname").Column from activecell.Column for Column offset:

activecell.Row - range("rngname").Row
activecell.Column - range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Hi Stefi

Thanks for the suggestion. It seems that RowRange and ColumnRange only apply
to Pivot Tables. I can't get your code to work for a worksheet range.

Best wishes

Richard

"Stefi" wrote:

Maybe you mean
activecell.Row-range("rngname").Row
activecell.Column-range("rngname").Column

Regards,
Stefi

€˛RichardGarfield€¯ ezt Ć*rta:

Help please. How do I find the offset of the active cell from the top left
cell in a named range?

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
move from active cell offset in macro april Excel Discussion (Misc queries) 5 October 18th 09 05:02 PM
run macro although blinking cursor is active in an active cell bartman1980 Excel Programming 1 December 20th 07 11:29 AM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Programming 4 September 28th 07 09:59 PM
active offset Don Guillett Excel Programming 14 January 27th 07 11:22 PM


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