Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA: Create new conditions
Hi all,
I have this program with a userform With a click of a command button i the userform, i want program to prompt user using input box for no. o criteria tables to create. (eg. in attchment LUTS) After prompting for no. of LUTS to create, program would prompt fo each LUTS no. of criteria in each LUT. Eg: command button click: inputbox: "Enter no. of LUT to create: " Eg. 3 in the attachment then next: inputbox: "Enter no. of criteria in LUT no. 1: " Eg. 5 in th attachment inputbox: "Enter criteria no. 1: " Eg. Tan inputbox: "Enter criteria no. 2: " Eg. Joo ..... ..... inputbox: "Enter criteria no. 5: " Eg. Lee Then this will continue for the 2nd LUT: inputbox: "Enter no. of criteria in LUT no. 2: " Eg. 4 in th attachment inputbox: "Enter criteria no. 1: " Eg. Alexander ..... ..... inputbox: "Enter criteria no. 4: " Eg. Hoh this will continue until all LUT and their criterias are created. Anyone knows how to do this using vba?? This is really complicated for me for someone of my lvl. :/ pls see attachment for details. Thanks in advanced. Abyss of the goa Attachment filename: newsample.xls Download attachment: http://www.excelforum.com/attachment.php?postid=63522 -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA: Create new conditions
The basic code is a number of simple loops
numLUTS = inputbox: "Enter no. of LUT to create: " For i 1 To numLUTS numCriteria = inputbox: "Enter no. of criteria in LUT no. " & i For j = 1 to numCriteria criteria = inputbox: "Enter criteria LUT no. " & i & " no " & j Next j Next i The tricky part is processing criteria when you have it. What do you want to do with it? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "wuming " wrote in message ... Hi all, I have this program with a userform With a click of a command button in the userform, i want program to prompt user using input box for no. of criteria tables to create. (eg. in attchment LUTS) After prompting for no. of LUTS to create, program would prompt for each LUTS no. of criteria in each LUT. Eg: command button click: inputbox: "Enter no. of LUT to create: " Eg. 3 in the attachment then next: inputbox: "Enter no. of criteria in LUT no. 1: " Eg. 5 in the attachment inputbox: "Enter criteria no. 1: " Eg. Tan inputbox: "Enter criteria no. 2: " Eg. Joo .... .... inputbox: "Enter criteria no. 5: " Eg. Lee Then this will continue for the 2nd LUT: inputbox: "Enter no. of criteria in LUT no. 2: " Eg. 4 in the attachment inputbox: "Enter criteria no. 1: " Eg. Alexander .... .... inputbox: "Enter criteria no. 4: " Eg. Hoh this will continue until all LUT and their criterias are created. Anyone knows how to do this using vba?? This is really complicated for me for someone of my lvl. :/ pls see attachment for details. Thanks in advanced. Abyss of the goat Attachment filename: newsample.xls Download attachment: http://www.excelforum.com/attachment.php?postid=635229 --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA: Create new conditions
Just put additional controls on the userform for the user to enter the
number of LUTS, then you can provide a couple of textboxes for the user to enter the details. After each set of criteria is entered, you event code would clear the textboxes and prompt (use a label) for the next LUTS' criteria. -- Regards, Tom Ogilvy "wuming " wrote in message ... Hi all, I have this program with a userform With a click of a command button in the userform, i want program to prompt user using input box for no. of criteria tables to create. (eg. in attchment LUTS) After prompting for no. of LUTS to create, program would prompt for each LUTS no. of criteria in each LUT. Eg: command button click: inputbox: "Enter no. of LUT to create: " Eg. 3 in the attachment then next: inputbox: "Enter no. of criteria in LUT no. 1: " Eg. 5 in the attachment inputbox: "Enter criteria no. 1: " Eg. Tan inputbox: "Enter criteria no. 2: " Eg. Joo .... .... inputbox: "Enter criteria no. 5: " Eg. Lee Then this will continue for the 2nd LUT: inputbox: "Enter no. of criteria in LUT no. 2: " Eg. 4 in the attachment inputbox: "Enter criteria no. 1: " Eg. Alexander .... .... inputbox: "Enter criteria no. 4: " Eg. Hoh this will continue until all LUT and their criterias are created. Anyone knows how to do this using vba?? This is really complicated for me for someone of my lvl. :/ pls see attachment for details. Thanks in advanced. Abyss of the goat Attachment filename: newsample.xls Download attachment: http://www.excelforum.com/attachment.php?postid=635229 --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA: Create new conditions
s The tricky part is processing criteria when you have it. What do yo
want to do with it? actually, after creating the LUTs, i want program to compare the LUT' criterias against the data cells and display the count of the no. o cells that matched. As you can see from the attachment, the result sheet shows 2 result of count: 1 is the result of count from individua criteria in the LUT and 1 is the result of the combined LUT's criterias So does this make sense?? Anyone?? y Just put additional controls on the userform for the user to ente the number of LUTS, then you can provide a couple of textboxes for th user to enter the details. After each set of criteria is entered, you even code would clear the textboxes and prompt (use a label) for the nex LUTS' criteria. can u show an example tom? -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create a formula with multiple (IF) conditions | Excel Discussion (Misc queries) | |||
Can I create more than 3 Condidtional Format conditions or can I w | Excel Worksheet Functions | |||
Create a formula with conditions | Excel Worksheet Functions | |||
How to create a formula that meets 2 different conditions... | Excel Discussion (Misc queries) | |||
How do I create a formula that has circular conditions? | Excel Discussion (Misc queries) |