Offset of active cell

  • Thread starter Thread starter RichardGarfield
  • Start date Start date
R

RichardGarfield

Help please. How do I find the offset of the active cell from the top left
cell in a named range?
 
Maybe you mean
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
 
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:
 
Many thanks, Stefi

With your help, I've solved it.

Best wishes

Richard
 
You are welcome! Thanks for the feedback!
Stefi

„RichardGarfield†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top