Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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 to create a formula with multiple (IF) conditions jimmy Excel Discussion (Misc queries) 4 July 14th 09 03:51 PM
Can I create more than 3 Condidtional Format conditions or can I w cocoblue Excel Worksheet Functions 2 May 15th 08 01:36 PM
Create a formula with conditions JP Excel Worksheet Functions 6 October 28th 07 03:38 AM
How to create a formula that meets 2 different conditions... Jennifer Excel Discussion (Misc queries) 2 April 25th 07 11:54 PM
How do I create a formula that has circular conditions? R Levin Excel Discussion (Misc queries) 1 November 9th 06 04:37 PM


All times are GMT +1. The time now is 06:08 AM.

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"