Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell lies within range
I think I have seen an elegant way of determining if a particular cell lies
within a particular range. eg. does cell(x,y) lie inside range(a:b) Any ideas? Thanks, Kaval |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell lies within range
Kaval,
MsgBox Not (Intersect(Cells(x, y), Range("a:b")) Is Nothing) HTH, Bernie MS Excel MVP "Kaval" wrote in message ... I think I have seen an elegant way of determining if a particular cell lies within a particular range. eg. does cell(x,y) lie inside range(a:b) Any ideas? Thanks, Kaval |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell lies within range
For example:
MsgBox Not Intersect (Range("A1"), Range("A2:Z100")) Is Nothing -- Vasant "Kaval" wrote in message ... I think I have seen an elegant way of determining if a particular cell lies within a particular range. eg. does cell(x,y) lie inside range(a:b) Any ideas? Thanks, Kaval |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell lies within range
Hi Kaval,
Try something like: Sub Tester09() Dim rng As Range Dim rcell As Range Set rng = Range("TEST") Set rcell = Range("A2") If Not Intersect(rcell, rng) Is Nothing Then MsgBox rcell.Address(0, 0) & " lies in the named " _ & rng.Name.Name & " range" Else 'It does not! End If End Sub --- Regards, Norman "Kaval" wrote in message ... I think I have seen an elegant way of determining if a particular cell lies within a particular range. eg. does cell(x,y) lie inside range(a:b) Any ideas? Thanks, Kaval |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding Data That Lies Between Two Dates | Excel Discussion (Misc queries) | |||
How to make cell width different than the column width it lies in | Excel Discussion (Misc queries) | |||
Finding the cell in which an object lies | Charts and Charting in Excel | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
Making a connection: shape clicked and cell it lies over. | Excel Programming |