ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   is current cell within a named range (https://www.excelbanter.com/excel-programming/412537-current-cell-within-named-range.html)

Cinque Terra

is current cell within a named range
 
Is there a clever way to test if the current cell is within a multi-column,
multi-row range?

Thanks in advance!

Gary Keramidas

is current cell within a named range
 
you can give this a try:

Sub test()
If Not Intersect(ActiveCell, Range("test")) Is Nothing Then
MsgBox ActiveCell.Address & " is within " & Range("test").Name
Else
'do nothing
End If
End Sub

--


Gary


"Cinque Terra" wrote in message
...
Is there a clever way to test if the current cell is within a multi-column,
multi-row range?

Thanks in advance!





All times are GMT +1. The time now is 11:31 PM.

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