ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   testing whether the ActiveCell is in a given range (https://www.excelbanter.com/excel-programming/336937-testing-whether-activecell-given-range.html)

Paul Ponzelli

testing whether the ActiveCell is in a given range
 
Is there a way to test whether the ActiveCell is in a given range?

For example, if a range named rngRedDog consists of the range D3:G6, how
could you test to see if the ActiveCell is in that range?

Thanks in advance,

Paul



Tom Ogilvy

testing whether the ActiveCell is in a given range
 
if Not Intersect(activecell,Range("rngRedDog")) is nothing then
' it is in a nmed range rngRedDog
end if

--
Regards,
Tom Ogilvy

"Paul Ponzelli" wrote in message
...
Is there a way to test whether the ActiveCell is in a given range?

For example, if a range named rngRedDog consists of the range D3:G6, how
could you test to see if the ActiveCell is in that range?

Thanks in advance,

Paul





Paul Ponzelli

testing whether the ActiveCell is in a given range
 
Ah, that's it. Thanks, Tom.




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com