Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Varibles determine macro to run


I have searched the forum for a clue to answer my own question with n
luck.
I am a novices compared to all of you.

I have parts spareing work book that creates a recommended parts lis
that people need depending on how many units they support and th
model.

I wanted to be able to look at three fields on top level sheet and us
this to select a macro to filter my data sheet, by the inputs and the
print a report of the parts they need.
I have the calculations worked out for the numbers.

I have two control buttons that will determine the level of parts Basi
or ALL.
THis is a matrix for how I will filter based on the button selected an
the varibles I find in cells D8, D9 and D11.

Combinations for all inputs. Note numbers will be 0 or 0 used 1 fo
simplicity.

D8 D9 D11 Detail Basic Run
1 0 0 1 0 Macro1
1 1 0 1 0 Macro2
1 0 1 1 0 Macro3
1 1 1 1 0 Macro4
0 1 0 1 0 Macro5
0 0 1 1 0 Macro6
0 1 1 1 0 Macro7
1 0 0 0 1 Macro8
1 1 0 0 1 Macro9
1 0 1 0 1 Macro10
1 1 1 0 1 Macro11
0 1 0 0 1 Macro12
0 0 1 0 1 Macro13
0 1 1 0 1 Macro14
* * * 0 0 ERROR
* * * 1 1 ERROR
0 0 0 * * ERROR

Thanks in advance for any thoughts

--
Dennis Lavalle
-----------------------------------------------------------------------
Dennis Lavallee's Profile: http://www.excelforum.com/member.php...fo&userid=3457
View this thread: http://www.excelforum.com/showthread.php?threadid=54346

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Varibles determine macro to run

Sub Filter()
Select Case Evaluate("=A2&B2&C2&D2&E2")
Case "10010": Call macro1
Case "11010": Call macro2
Case "10110": Call macro3
Case "11111": Call macro4
Case "01010": Call macro5
Case "00110": Call macro6
Case "01110": Call macro7
Case "10000": Call macro8
Case "11001": Call macro9
Case "10101": Call macro10
Case "11101": Call macro11
Case "01001": Call macro12
Case "00101": Call macro13
Case "01101": Call macro14
Case Else: MsgBox "Invalid code"
End Select
End Sub

HTH
--
AP

"Dennis Lavallee"
<Dennis.Lavallee.280rqn_1147983002.4768@excelfor um-nospam.com a écrit dans
le message de news:
...

I have searched the forum for a clue to answer my own question with no
luck.
I am a novices compared to all of you.

I have parts spareing work book that creates a recommended parts list
that people need depending on how many units they support and the
model.

I wanted to be able to look at three fields on top level sheet and use
this to select a macro to filter my data sheet, by the inputs and then
print a report of the parts they need.
I have the calculations worked out for the numbers.

I have two control buttons that will determine the level of parts Basic
or ALL.
THis is a matrix for how I will filter based on the button selected and
the varibles I find in cells D8, D9 and D11.

Combinations for all inputs. Note numbers will be 0 or 0 used 1 for
simplicity.

D8 D9 D11 Detail Basic Run
1 0 0 1 0 Macro1
1 1 0 1 0 Macro2
1 0 1 1 0 Macro3
1 1 1 1 0 Macro4
0 1 0 1 0 Macro5
0 0 1 1 0 Macro6
0 1 1 1 0 Macro7
1 0 0 0 1 Macro8
1 1 0 0 1 Macro9
1 0 1 0 1 Macro10
1 1 1 0 1 Macro11
0 1 0 0 1 Macro12
0 0 1 0 1 Macro13
0 1 1 0 1 Macro14
* * * 0 0 ERROR
* * * 1 1 ERROR
0 0 0 * * ERROR

Thanks in advance for any thoughts.


--
Dennis Lavallee
------------------------------------------------------------------------
Dennis Lavallee's Profile:
http://www.excelforum.com/member.php...o&userid=34572
View this thread: http://www.excelforum.com/showthread...hreadid=543463



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Varibles determine macro to run


Thanks, I'll try it today.

Again Thanks:

--
Dennis Lavalle
-----------------------------------------------------------------------
Dennis Lavallee's Profile: http://www.excelforum.com/member.php...fo&userid=3457
View this thread: http://www.excelforum.com/showthread.php?threadid=54346

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Varibles determine macro to run


Ardus, I thank you for getting me going works like a champ.

Thank

--
Dennis Lavalle
-----------------------------------------------------------------------
Dennis Lavallee's Profile: http://www.excelforum.com/member.php...fo&userid=3457
View this thread: http://www.excelforum.com/showthread.php?threadid=54346

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Varibles determine macro to run

Thanks for the feedback!

Cheers,
--
AP

"Dennis Lavallee"
<Dennis.Lavallee.2825qn_1148047804.6819@excelfor um-nospam.com a écrit dans
le message de news:
...

Ardus, I thank you for getting me going works like a champ.

Thanks


--
Dennis Lavallee
------------------------------------------------------------------------
Dennis Lavallee's Profile:
http://www.excelforum.com/member.php...o&userid=34572
View this thread: http://www.excelforum.com/showthread...hreadid=543463



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
how can you let macro determine to where to copy mohavv Excel Discussion (Misc queries) 1 May 29th 08 08:15 AM
Use Combo Box value to determine macro used Richhall[_2_] Excel Worksheet Functions 1 January 4th 08 01:28 PM
Making a graph with 3 independant varibles rebecca856 Excel Discussion (Misc queries) 0 March 7th 07 02:14 PM
Excel Pivot Tables-How to put two Data Varibles side by side BillyBob Excel Worksheet Functions 2 January 23rd 07 10:35 PM
declaring varibles looping probelm l1075[_3_] Excel Programming 4 May 6th 04 01:44 PM


All times are GMT +1. The time now is 03:32 PM.

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

About Us

"It's about Microsoft Excel"