Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default intersection with multiple ranges

I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default intersection with multiple ranges

It's difficult to follow your objective

I need to match or intersect e12/029, f12/p29, etc.


Do you mean intersect(range("e12:o29"), range("f12:p29"))

or do you mean

Intersect(t, a, aa, etc)

or something else?

Regards,
Peter T

"pburk" wrote in message
...
I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form
has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default intersection with multiple ranges

thank you for responding.
My form has multiple Excel pull down lists which store reference values in
cells o29, p29, q29 etc. When the user selects a certain item within that
pull down list a user form activates. that part is working fine.
What I am trying to set up is : if cell o29 is "3" (selection item from
drop down list) and user double clicks e12 then that user form re-activates.
that is where the match comes in o29/e12, p29/f12, etc.

Input is appreciated.

"Peter T" wrote:

It's difficult to follow your objective

I need to match or intersect e12/029, f12/p29, etc.


Do you mean intersect(range("e12:o29"), range("f12:p29"))

or do you mean

Intersect(t, a, aa, etc)

or something else?

Regards,
Peter T

"pburk" wrote in message
...
I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form
has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default intersection with multiple ranges

I'm sorry but I really don't follow what you are trying to do. Try and
describe an example with known ranges you start with and the range you want
returned from the Intersect.

Regards,
Peter T

"pburk" wrote in message
...
thank you for responding.
My form has multiple Excel pull down lists which store reference values in
cells o29, p29, q29 etc. When the user selects a certain item within that
pull down list a user form activates. that part is working fine.
What I am trying to set up is : if cell o29 is "3" (selection item from
drop down list) and user double clicks e12 then that user form
re-activates.
that is where the match comes in o29/e12, p29/f12, etc.

Input is appreciated.

"Peter T" wrote:

It's difficult to follow your objective

I need to match or intersect e12/029, f12/p29, etc.


Do you mean intersect(range("e12:o29"), range("f12:p29"))

or do you mean

Intersect(t, a, aa, etc)

or something else?

Regards,
Peter T

"pburk" wrote in message
...
I am need of some help. I got the script to use an intersection to call
a
macro for certain conditions. I have multiple pull downs, 1 being at
e12.
based on the pull down selection (o29) then a macro is called. My form
has
18 pull downs. if a particular item is selected in the pull down then
the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default intersection with multiple ranges

Set Target = ActiveCell
Set a = Range("E12")
Set aa = Range("O29")
If Intersect(Target, Union(a, aa)) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick


--
__________________________________
HTH

Bob

"pburk" wrote in message
...
I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form
has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default intersection with multiple ranges

thank you for the response. This coding worked for the first instance
e12/o29. When I add additional cell references, acts like a cell edit mode.
My additional explanation to Peter might assist in my explanation of what
I'm trying to set up.

"Bob Phillips" wrote:

Set Target = ActiveCell
Set a = Range("E12")
Set aa = Range("O29")
If Intersect(Target, Union(a, aa)) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick


--
__________________________________
HTH

Bob

"pburk" wrote in message
...
I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form
has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default intersection with multiple ranges

this is what i have modified. double click on cell f12 goes to a cell edit
mode.

Set Target = ActiveCell
Set a = Range("e12")
Set b = Range("f12")
Set aa = Range("o29")
Set ab = Range("p29")
If Intersect(Target, Union(a, aa)) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick
If Intersect(Target, Union(b, ab)) Is Nothing Then Exit Sub
Cancel = True
If ab.Value = 3 Then idc5_pick


"pburk" wrote:

I am need of some help. I got the script to use an intersection to call a
macro for certain conditions. I have multiple pull downs, 1 being at e12.
based on the pull down selection (o29) then a macro is called. My form has
18 pull downs. if a particular item is selected in the pull down then the
macro executes.

Set t = Target
Set a = Range("e12")
Set aa = Range("o29")
If Intersect(t, a) Is Nothing Then Exit Sub
Cancel = True
If aa.Value = 3 Then idc4_pick

I need to match or intersect e12/029, f12/p29, etc.
Is this a possibility or is it wishful thinking?
thank you in advance for any input.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for intersection of two named ranges brucemc Excel Programming 8 April 3rd 06 02:16 PM
intersection of named ranges Dave B[_9_] Excel Programming 4 December 15th 05 10:42 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Worksheet Functions 10 September 7th 05 09:40 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Programming 10 September 7th 05 09:40 PM
Use intersection of column and TWO ranges in formula? Ed Excel Programming 2 January 12th 05 02:39 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"