I need help in solving this program problem...

Status
Not open for further replies.

jaeb4u2c

New Member
I am putting together an Excel program that will do some very interesting calculations and I am duped on how to set up a particular program for what I need accomplished. If you could assist me with this problem I would be eternally grateful. Here is what I need:

Lets say that I have a series of numbers (ex. 40,11,18,29,22,8, etc.)
Lets say I assign to each of these numbers a letter designation (H or C)
Now lets say that I want to create a program that will tell me the difference combinations that I can get from a group of numbers when I select a particular pattern for these numbers. For example, lets say that for the numbers that are selected I want a pattern that gives me all the different combinations for those numbers that meet the criterion of:

HHCCHH, or (40=H; 11=H; 18=C; 29=C; 22=H; & 8=H)
HHHCCC, or (40=H; 11=H; 18=H; 29=C; 22=C; & 8=C)
HCCHCC, or (40=H; 11=C; 18=C; 29=H; 22=C; & 8=C), etc.

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

BrianB

Well-known Member
Not really clear about what you intend to start with, or how results are achieved. However, when you talk about "all possible combinations" some form of code containing "nested loops" is suggested.

Haave a look at my code here ... the principle will be similar.

http://www.mrexcel.com/board2/viewtopic.php?t=151526&highlight=

Status
Not open for further replies.

Replies
4
Views
153
Replies
1
Views
484
Replies
2
Views
195
Replies
1
Views
233
Replies
1
Views
162

1,196,019
Messages
6,012,898
Members
441,738
Latest member
dataexcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back