Combinations/Permutations Of Words/Text

Apr 23, 2008

I'm trying to figure out how to generate all combinations from a list
of N values in a column, let's say column A. In particular, I want to have all combinations of 2 values, 3 values, 4, ... up to 7 values. To give an example: Let's assume I have a list of only 3 values (1,2,3) for which I want to have all combinations of two values. In this case, the result would be 1,2; 1,3; and 2;3. The ordering of the values does not matter, i.e. duplicates should be eliminated.

View 4 Replies


ADVERTISEMENT

Unique Combinations/Permutations Of Words

May 16, 2008

I have a list for example:

apple
pear
grape
orange

i'm after some code that will create every possible combination of the list.

The examples i've found in the archives give all possible combinations of the same list in a different order

e.g apple, pear, orange, grape.......apple, orange, pear, grape.........apple, grape, orange, pear etc etc etc... THIS IS NOT WHAT I'M AFTER.

i'm after every possible combination starting right at the beginning with single words

e.g

apple
apple, pear
apple, pear, orange
apple, pear, orange, grape
pear, orange,
pear, orange, grape
orange,
orange, apple

etc etc you get the idea..... but i do not want repititions like

apple, pear.........pear, apple.
apple, orange, pear ...........pear, orange, apple.

View 9 Replies View Related

All Possible Combinations/Permutations Of Text Strings

Aug 30, 2006

I was just wondering is it possible that a excel spreadsheet could find all the different combinations for these set of letters. Also i can only have 1 letter from each group per combination.

First Group ABCDE

Second Group FGHIJK

Third Group LMNOP

Forth Group QRST

Anyone know is this is possible to create?

View 4 Replies View Related

Combinations (not Permutations)

Apr 26, 2006

You will find a VBA Code for a PRIVATE example - displaying all 6 numbers combinations out of 10 (1-10).

My code displays them (in column "A") BUT What my question to you is - does someone have a General/Universal code to handle other kinds of combinations.

To my opinion, the usage of Nested (For-Next) Loops will not be the ideal solution - so maybe by using VBA Recursion ?

View 3 Replies View Related

All Combinations/Permutations

Jun 2, 2007

I must first thank the forums for the amazing help in making my life just a little easier, especially member "shg" for helping set up the VBA code to help me.

So I have a sheet to develop all possible combinations of units, the letters with their associated values above, as well as the maximum number of units possible. The user inputs a top value, this is followed by some subtraction leading to a working value with a tolerance level in which the sum of the combinations needs to remain within.

What my predicament is that while the VBA code in the attached book works to develop most combinations, when I input a small number such as 405, the combinations that arise are not complete. The results are shown in the attached workbook: show combinations of H and PP, but any human can read that there should also be 2 HN in the results, as the math add's up to within the tolerance level.

View 9 Replies View Related

Generating Permutations And Combinations

Jun 27, 2009

For Ex:- If there are three Items.. A B C and forming a group of 2
then the the total no of combinations would be permut(3,1) = 6...

I need this to be shown as follows depending on the no of itmes and no of group no=2 in this case...

Permuations & Combinations are as follows:

AB
AC
BC
CA
CB
BA

View 10 Replies View Related

VB For Combinations Permutations (3 Datasets)

Mar 1, 2013

I own a custom print shop and I am trying to generate skus based on variables..Column A will only have one item (the product code), column B will have the sizes, Column C may contain more or less colors depending on what is offered for the shirt style, Column D hopefully can contain all the combinations. All this data will be in contained within one worksheet..

Column A
Column B
Column C
Column D

G200
S
Red

[Code] .......

View 3 Replies View Related

Permutations Or Combinations Of A Set Of Numbers

Mar 11, 2009

I want to output every combination of a set of numbers. These permutations must include combinations that use only a few of the numbers as well as all eight...ie.

1,
1,2
1,2,3
as well as 1,2,3,4,5,6,7,8

The macro below is from
http://www.j-walk.com/ss/excel/tips/tip46.htm
This only produces combinations using every number. I'm not sure how this macro works but hopefully someone with better know how could run with it or break it down for me!

I only need to achieve this once but am pretty sure doing it manually will cause error and or madness

Dim CurrentRowSub GetString() Dim InString As String InString = InputBox("Enter text to permute:") If Len(InString) < 2 Then Exit Sub If Len(InString) >= 8 Then MsgBox "Too many permutations!" Exit Sub Else ActiveSheet.Columns(1).Clear CurrentRow = 1 Call GetPermutation("", InString) End IfEnd SubSub GetPermutation(x As String, y As String)' The source of this algorithm is unknown Dim i As Integer, j As Integer j = Len(y) If j < 2 Then Cells(CurrentRow, 1) = x & y CurrentRow = CurrentRow + 1 Else For i = 1 To j Call GetPermutation(x + Mid(y, i, 1), _ Left(y, i - 1) + Right(y, j - i)) Next End IfEnd Sub

View 9 Replies View Related

Combinations/Permutations Of Values

Oct 5, 2006

I have a number 23753.2570, to be precise.

in another column, i have 400 rows filled with different numbers, from 1.4 to 23000,7840.

I need to find out all the possible combinations of which numbers from that 400 can make up 23753.2570.

so if my number was 40,000, and i had 4 cells with 10,000 in them, the outcome will be:

"There are 4 possible combination to your value"
then paste it into a new worksheet with the results
[cell1] = 10000 + [cell2] = 10000 + [cell3] = 10000 + [cell4] = 10000
Total = 40000

i found this code, but i tested it on the example above and it said "All Combinations exhausted" which they wasn't?

Sub findsums()

'This *REQUIRES* VBAProject references to
'Microsoft Scripting Runtime
'Microsoft VBScript Regular Expressions 1.0 or higher

Const TOL As Double = 0.000001 'modify as needed
Dim c As Variant

View 9 Replies View Related

All Combinations Or Permutations From 2 Lists

Oct 24, 2006

I've got what I think is a pretty interesting problem, not sure if it can be solved with Excel, and if not that's fine I'll think of something better but thought I would put it up here.

I have two lists, one of adjectives, one of nouns. I want somehow to generate every possible combination of the two. Eg:

List 1:
Adj1
Adj2
Adj3

List2:
Noun1
Noun2
Noun3

gives us:
'Adj1&Noun1', 'Adj1&Noun2', 'Adj1&Noun3', 'Adj2&Noun1' ... etc etc

Is there a way to solve this problem using a macro or a pivot table?
NB ideally i would like all possible combinations to include reversals. i.e. 'Noun1&Adj1' and 'Adj1&Noun1' etc.

View 9 Replies View Related

Matrix Combinations And Permutations

Mar 15, 2007

i've got 2 numeric numbers one in each cell. These numbers indicate Maximum occupancies for a hotel room...

Maximum Adults Maxmium Occ
3 5

The Occupancy table looks like this

Adults Children Infants... so taking the above numbers the table should be built up like this

Adults Children Infants
1 0 0
2 0 0
3 0 0
1 1 0
1 2 0
1 3 0
1 4 0
1 1 1
1 1 2
1 1 3

3 2 0
3 0 2
3 1 1

etc...

so basically to room can have a maxium of 3 adults and 2 children equaling the maxium room occupancy.

i'm trying to create a function that will automatically do this and workout subsquent numbers below the maxmium but i can't get anywhere near the result i am looking for...

View 8 Replies View Related

Generate All Combinations From 2 Columns NOT Permutations

Feb 14, 2013

I have two columns of data in a worksheet, and I need a third column that shows all of the possible combinations of the data in those two columns. For example:

A
A
AA

B
B
AB

[Code] .....

I don't need permutations so, for example, the third column should only give the combination "AB" and exclude "BA".

View 4 Replies View Related

Permutations/Combinations For Column Relative To Groups In Another

Aug 23, 2009

I need to figure out how I can get excel to write me a list of permutations / combinations for the Group (column a) and Item (column b) columns in the example. The group designates the items that should be inlcuded in the combination / permutation in Related Items (column c). I have thousands of lines to do this with so I need to figure a way to automate it. I have started the Related Items column which is the results I need output. If it could format it like this adding in the space between the rows as it outputs the answer that would be perfect. Anyone know how to do this? I've found many answers, but none that have 2 columns with separate grouping within the column.

View 4 Replies View Related

Permutations For WORDS In A Cell

Jul 23, 2012

I need VB codes for an activity in excel. Im trying to create an example file for the suppliers to enter keywords (Search keyword) where it should generate different formats of the search (WORDS) and its case sensitive. Suppliers would be typing the keywords in A2 and it should generate the Permutations horizontally against the keyword (B2 C2 D2 E2 etc). Let me know if you need more clarifications.

Example given below and also attached the file for your reference.

New Keyword – Singular Proper Case
Singular-PR
Singular-LC
Singular-UC

[Code]....

View 4 Replies View Related

Finding All Unique Combinations Of List Of Words?

Dec 6, 2011

I have 15 different words that I want to order in as many ways as possible, but only 3 at a time.

So let's say the words are:

cat
dog
elf
clown
monkey
rock
bananas
(etc)

then I want a list that has all of these possible combinations:

cat dog elf
cat dog clown
cat dog monkey
cat dog rock
cat dog bananas
cat elf clown
cat elf monkey
(etc)

until all are listed. I understand there is a huge number, I don't mind having a couple of thousand as long as they are all genuinely unique.

I CAN have elf dog cat, elf cat dog, dog elf cat later on ... it's just the order that needs to be unique not the words in the phrase.

View 9 Replies View Related

Excel 2007 :: Permutations Of Text String For Phone Scripts

Mar 21, 2012

I have phone scripts that can be built from 6 different categories. Each of the 6 categories has anywhere from 1 to 11 different scripts within them.

I want to generate every possible script from these options, i.e:

Part I:
"Hi, as of 8am, on march 20th"

Part II:
"our records indicate 2 changes"
"our records indicate 50 changes"
"our records indicate no changes"

[Code] ......

I am using Excel 2007.

View 1 Replies View Related

Number Combinations :: 25 Random Numbers (5 Digit Combinations)

Dec 15, 2008

I have 25 random numbers and I would like to get a possible 5 digit combinations of these numbers. Can anybody help me with the possible formula?

View 9 Replies View Related

Count Number Of Times Text Combinations Appear In Same Column

Oct 6, 2013

A1:A10 contains text (say colors) and B1:B10 also text (say vegetables). I need a formula to count the number of times a certain combination of numbers and vegetables appear in the same column, so if "red" and "carrot" appeared in A4 and B4 and also in A6 and B6, the result would be 2.

View 4 Replies View Related

Excel 2003 :: Take Specific Text From Cell And Copy It In New One (Text And / Or Words Position Varies)

Jan 17, 2013

I'm having a 6000+ records, (contacts DB) exported in Excel 2003 format from MS Outlook.

Except the "First" and "LastName", all other contact elements are in the field "Notes" (which is the BZ column according to the exported outlook layout) multiplied by 6469 (records in total)

Useful information are included !!!

I'll give an example of a record...

Column: BZ, Row: 543 says --> "2110000000-6989000000, 1TOK_TER:17-11-010(25 DAYS LESS),
KATERINA 25 (MANTAS KALNNNNN_HYPERTENSION)1000-150, W:95_105, , HR THE 16wks_US NEFRON OK,
NT OK_B EPIP OK(GOLF BALL)_KAMPILI ORIAKI(DIAITA)_DOPPLER OK, O+,TEST OK(TOX_), , , , , , "

Now, I want every time to take the part of the text says "TER:something..." (part of which is date, but not every time with the known format dd-mm-yyyy, as you see here is yyy, followed by something else, with parenthesis here and maybe more data) and copy it in a new cell..., e.g:CO Column, same Row...

Above and every field which by the way is formatted as General (and it is text mainly) are made by merging older excel fields where data laid here and there, that's why you see the commas...with the method of a module with the following code:

Function MyMerge(Rng As Range)
For Each Cell In Rng
Temp = Temp & Cell.Value & ", "
Next Cell
Temp = Mid(Temp, 1, Len(Temp) - 2)
MyMerge = Temp
End Function

Note1:Records with the above string (TER:dd-mm-yyy) are 771 from 6469.
Note2: As an alternative solution I can see an extraction of the TER:dd-mm-yyy string and the copy in a new place, like the:CO Column, same Row...

View 9 Replies View Related

Number Combinations :: Between 7 To 15 (6 Digit Combinations)

Jun 30, 2008

What I am looking for is to select between 7 and 15 numbers in total, I want all the possible 6 digit combinations for this.

EG: if I choose 2,9,11,13,15,17&26, it would look something like this

2,9,11,13,15,17
2,9,11,13,15,26
9,11,13,15,17,26
And so on.

If I chose more numbers (10) 1,2,3,4,3,6,7,8,9,10 it would start something like this

1,2,3,4,5,6
1,2,3,4,5,7
1,2,3,4,5,8
1,2,3,4,5,9
1,2,3,4,5,10
And so on.

Please remenber I would like to be able to secelt between 7 and 15 number and be given all the possible combinations.

I would like it to be in one sheet but if that can not be done on as many as it takes.

It would be good if I could just type the required number into A1,B1,C1 and so on and they just gave the combinations required.

View 9 Replies View Related

Finding 2 Or 3 Words In Text?

Mar 7, 2012

I need to find from the second word until just before a numeric number.

Thus the text in Column H is as follow:

COLUMN H

1234234 My name is John 12 Jul
34243 I am 10 years old 23 Feb
4345345 Peter 23 Jan

So, I need the text in RED extracted only. All words are seperated by spaces. It will always start from the second word and continues until it finds the first number. All words between these must be extracted.

My formula below is to extract the 1st Word, thus all I need is the formula for the above situation and replace the one below with it.

a.Formula = "=Left(h2,find("" "",h2)-1)"

View 9 Replies View Related

Text Convert To Other Words

Apr 9, 2008

Do any formulas can converts text to an anothers words ?

sample : if any words to ( LA CA LN & TN ) than Change to "USA"

Col: A will have the abnormal text .

Col: B want to consolidate that's to "US" if match with the certeria /

View 9 Replies View Related

Search String Of Words In Text?

May 27, 2013

I am trying to search words that are in column A (5 letter combinations of sequences) within the text in column B (amino acid sequence).

So I am stumbling upon 2 questions:

- what is the function that would do this search.

- how to acchieve to reverse the text in B1 cell (eg. abcde --> edcba , but with 600 letters),

sample file: test.xlsx

View 4 Replies View Related

Searching Text In Cells For Words

Mar 17, 2008

I have a column that is filled with text of varying lengths and I'd like to search through each cell in that column looking for a specific word or words. Unfortunately the length of the text varys greatly between each cell and there is very little uniformity so I need to be able to search through the entire entry in each cell and then highlight that row if a specific word or words are found.

I'd also like to be able to add a number "1" in another column on the same row if the search finds a word or words. Any help would be greatly appreciated.

If the cell only contains the exact word or string I'm looking for then it's easy but I can't figure out how to search through text in a cell that contains more than I'm looking for.

example: Lets say I'm loooking for "caught fire"
column Q contains:
1 "The computer caught fire after several hours"
2 "A house on the hill caught fire"

If "caught fire" exists in the cell being checked, then highlight the row and put a 1 in a specific column, lets say J.

View 14 Replies View Related

Find Words In Text String

May 28, 2014

How can i find the first 15 letters or numbers in a text string "material change:"

or find ":" then display everything to the left of that symbol ?

assume formula in a1 and test string in b1.

I wish there was a class you could take on this stuff.

View 9 Replies View Related

Is Text In Cell Containing Multiple Words

Jul 24, 2007

What formula should I use to search a certain text that might be on the beginning, middle or end of a cell to use it as a condition for an IF formula to return a related description. In the example below the text would be "deposit".

View 2 Replies View Related

Assign Numbers To Text Words

Sep 7, 2007

I would like to know if I can do a VBA code that takes one formule that is showed as text in one cell (eg '=wood+plastic) to the next cell to really use it... I mean, that one time we define de "wood" valeu and plastic valeu will realize the calcul.

View 9 Replies View Related

Match Several Key Words To Display Text

Jun 22, 2008

I have three worksheets with the first worksheet having several dropdown boxes containing key words.

The second worksheet has three cells with different combinations of the key words and a fourth cell with equipment names. There are nearly one hundred entries in this format.

What I am trying to do is on the third worksheet to display the equipment name for which the three key words from the second worksheet match the user selected key words from the first worksheet.

View 5 Replies View Related

Checking Text In Cells Against List Of Possible Words?

Dec 27, 2013

I'm trying to make a game where from a choice of 16 words the contestant has to choose four of those words that, when another word is placed before or after each word it makes a phrase.

e.g From this list of 16 words
albert
bell

[Code]....

choosing bell, bottle, print, stocking can all have BLUE placed before them to make bluebottle, blueprint etc. That would be the correct answer. Choosing their four words would be from a drop down list of all 16 words, separate cell for each list options/chosen answer. bell bottle printstockingCORRECT

There would be 4 rows in total for 4 different answers to be made from the 16 words on offer. I have tried everything to get it to work in the 5th cell but it's difficult.

View 3 Replies View Related

Extract Words From Within Text Of HTML Code?

Nov 5, 2012

Many lines on my sheet have the following text in col B.

****** http-equiv="Content-Type" content="text/html; charset=UTF-8"> ****** name="generator" content="http://www.movabletype.org/"> Church Marketing Sucks: Evangelism & Outreach Archives

Is there a way to extract all the text or words between the and tags and put the extracted text into col D?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved