Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding if a cell is within a Range
i have a range (A1:C10) set to a variable "R" and i have a
cell set to a variable "C" (First E.I. B5, Second E.I. D5) i need to know if C is within R i have tried Set NewC = Application.Intersect(R, C) First E.I. it works good, no probs But on the second E.I. NewC = nothing Currently I have an error handler working with the cell that is out side the range but their has to be a better way to do this any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding if a cell is within a Range
You seem to have already worked out the key elements of the following approach:
If Intersect(R, C) Is Nothing Then MsgBox "No intersect" Else MsgBox "Intersect" End If PS: What does E.I. signify? -- John Green - Excel MVP Sydney Australia " wrote in message ... i have a range (A1:C10) set to a variable "R" and i have a cell set to a variable "C" (First E.I. B5, Second E.I. D5) i need to know if C is within R i have tried Set NewC = Application.Intersect(R, C) First E.I. it works good, no probs But on the second E.I. NewC = nothing Currently I have an error handler working with the cell that is out side the range but their has to be a better way to do this any ideas? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding if a cell is within a Range
thanks i was missing the is :)
-----Original Message----- You seem to have already worked out the key elements of the following approach: If Intersect(R, C) Is Nothing Then MsgBox "No intersect" Else MsgBox "Intersect" End If PS: What does E.I. signify? -- John Green - Excel MVP Sydney Australia " wrote in message ... i have a range (A1:C10) set to a variable "R" and i have a cell set to a variable "C" (First E.I. B5, Second E.I. D5) i need to know if C is within R i have tried Set NewC = Application.Intersect(R, C) First E.I. it works good, no probs But on the second E.I. NewC = nothing Currently I have an error handler working with the cell that is out side the range but their has to be a better way to do this any ideas? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
An old chestnut: finding the last cell in a range | Excel Worksheet Functions | |||
Finding the position of the i-th non blank cell in a vertical range | Excel Worksheet Functions | |||
Finding Cell Outside Of Range | Excel Worksheet Functions | |||
Finding max array value of variable cell range | Excel Discussion (Misc queries) | |||
Finding the bottom non-blank cell in a range | Excel Discussion (Misc queries) |