We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Range question

GordonMasson
GordonMasson asked
on
Medium Priority
297 Views
Last Modified: 2012-05-11
Can you tell me what the code
If (Not Intersect(Target, Range("AD2:AD35000")) Is Nothing) _
    Or (Not Intersect(Target, Range("AH2:AH35000")) Is Nothing) Then.....

means please
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2008

Commented:
The code is checking if the Target range is in either of the specified ranges.

Kevin
CERTIFIED EXPERT
Top Expert 2008
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
and by Target that means the text/value in the cell that has been selected?
CERTIFIED EXPERT
Top Expert 2008

Commented:
That depends on where the code is. If in the SelectionChange event handler then yes.

Kevin

Author

Commented:
Thanks
CERTIFIED EXPERT
Top Expert 2008

Commented:
And Target is a Range object, not a cell value. If you select a cell then Target is a Range object that refers to the selected cell or cells. Target.Value returns the value or values contained in the selected cell(s). Of course, most of the time an object has a default property and, in the case of the Range object, it is Value.

Kevin
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.