ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range Names (https://www.excelbanter.com/excel-programming/313278-range-names.html)

Helen Trim[_4_]

Range Names
 

This works, though it might not be the most elegant
solution:

Dim RangeName As String
RangeName = "Revenue"

If ActiveCell.Column = Range(RangeName).Column And
ActiveCell.Row = Range(RangeName).Row Then
MsgBox "is"
Else
MsgBox "isn't"
End If

HTH
Helen


arno

Range Names
 
Hi Helen,

what are you after? Maybe, you'd have a look at "Intersect-Method" in
VBE-Help.

This works, though it might not be the most elegant
solution:



arno


Bob Phillips[_6_]

Range Names
 
Dim RangeName As String
RangeName = "Revenue"

If Not Intersect(Activecell, Range(RangeName)) Is Nothing Then
MsgBox "is"
Else
MsgBox "isn't"
End If



--

HTH

RP

"Helen Trim" wrote in message
...

This works, though it might not be the most elegant
solution:

Dim RangeName As String
RangeName = "Revenue"

If ActiveCell.Column = Range(RangeName).Column And
ActiveCell.Row = Range(RangeName).Row Then
MsgBox "is"
Else
MsgBox "isn't"
End If

HTH
Helen





All times are GMT +1. The time now is 12:21 PM.

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