# Every Possible Number Combination/Permutation

Aug 22, 2006Can Excel work out every possible combination of 3 numbers from a numbered set 1-24.

I need every combination of 3 numbers.

Can Excel work out every possible combination of 3 numbers from a numbered set 1-24.

I need every combination of 3 numbers.

ADVERTISEMENT

I have letter and number combination code in two collumns and they differ for 10.000 numbers:

BAM98314

BAM88314

BAM90000

BAM80000

As you can see the left code is for 10000 numbers higher. the letters are allways the same. In the event that this isn't so, if difference between codes in same row is more or less than 10000 numbers. I was thinking on making conditional formating so the cells with wrong difference would be marked red, but I do not know how to make formula for this difference.

1

0

0

4

6

=largeodd(a1:e1)

=largeeven(a1:e1)

write a udf function to deal with the above ?I know large(a1:e1,1) for picking up the largest one in the row,but no idea to find the largest one when these five numbers are combined to build a 5-digit number.

[ want to find largest 5-digit (also 4 ,3 digit ) numbers combined by thess five numbers]

I'm trying to figure out how to setup a worksheet to find the most common 2 digit numbers going vertically from the bottom(cold) to the top(hot) it would consist of 90 digits 0 thru 9

it would look like this

4 0 3 9 0 4 3 3 2

9 2 5 6 5 6 9 6 6

8 9 9 3 1 0 2 9 8

1 6 7 5 9 9 8 2 5

2 7 2 2 2 8 5 1 3

0 1 4 7 4 7 6 0 9

3 5 6 4 3 3 0 4 4

7 8 8 1 8 5 7 8 7

5 4 1 8 6 1 1 5 1

6 3 0 0 7 2 4 7 0

each vertical line would be considered weeks 9 thru 1. week 9 would be the first vertical line of digits on the left. it could also contain the most common 2 digits horizontally. Both 2 digit values would be color coded ex. blue equals most common 2 digit horizontally and green equals vertically. I would also like to color code the most common 2 digit value diagonally as long as it is the most common of either the vertical or horizontal 2 digit. Each number is seperate on the worksheet they would not be pairs. im using excell 2003.

I want to convert a Lexicographic Index Number, better known as Combination Sequence Number (CSN) to a combination using an EXCEL formula.C(n, k) Lexicographic Index Numbers, where n is the total numbers drawn from, and k is the total numbers drawn.

I have a lookup table in cell M1:R56 which holds the correct data, that I am pretty sure about.

In cell G1 I have the Lexicographic Index Number I want converted to a combination.

In cell J2 I have the value 39 (n).

In cell I2 I have the value 5 (k).

In cell K2 I have the formula =COMBIN($J$2,$I2).

In cell A1 (the first number in the combination) I have the formula:

=IF(G1=0,"",$J$2-VLOOKUP($K$2-G1,$M$1:$R$56,6))

In cell B1 (the second number in the combination) I have the formula:

=IF(G1=0,"",$J$2-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,5))

In cell C1 (the third number in the combination) I have the formula:

=IF(G1=0,"",$J$2-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1),$O$1:$R$56,4))

In cell D1 (the fourth number in the combination) I have the formula:

=IF(G1=0,"",$J$2-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1)-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1),$O$1:$R$56,1),$P$1:$R$56,3))

In cell E1 (the fifth number in the combination) I have the formula:

=IF(G1=0,"",$J$2-($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1)-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1),$O$1:$R$56,1)-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1)-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1))-VLOOKUP($K$2-G1-(VLOOKUP($K$2-G1,$M$1:$R$56,1)),$N$1:$R$56,1),$O$1:$R$56,1),$P$1:$R$56,1)))

This works for the vast majority, but gives an ERROR when numbers 35,36,37,38,39 are in the combination, but funny enough NOT all the time.Lexicographic Index Number 575757 which is the maximum combination gives ALL ERRORS.

I'm currently trying to make a sort macro that sorts a row of data that has a combination of numerical data and the text entry "N.A."

e.g.:

My field:

1

2

N.A

4

5

N.A

9

I want to sort the cells by descending value. But the result appears as:

My field:

N.A

N.A

9

5

4

2

1

But I want to numbers to appear first and have the "N.A."s to be after the number, since I have about 100 columns and some rows have like 30 N.A., which is pretty bad for usability if all that appears in the first screen are "N.A."

EDIT: by the way by ascending the data is fine since it orders by smallest number to largest and THEN the "N.A."

I am looking for an efficient solution to the following problem. I have a sales table with two columns, titled C1 and C2. The first column lists the product sold, and the second column lists the associated customer.

Here's what I mean (though I can't figure out how to create neat columns in this post):

[C1] [C2]

Prod1 CharlieCo

Prod3 AlphaCorp

Prod2 BetaInc

Prod3 BetaInc

Prod1 AlphaCopr......................

I'm looking for another excel game changer (for the work I do anyway).

I have a dollar amount, and I want to know if any combination of dollar amounts in a particular range of cells will equal that dollar amount. Is this possible in Excel?

Example: I have 20 different dollar amounts in a column. I want to know what combination of those 20 different dollar amounts, if any, will equal $257.97. The dollar amount I'm looking for and the numbers in the range will change with each use. I'm hoping for a formula, but VBA will work too as I could just make a template and copy / paste the numbers in.

I have a column of references I wish to standardize. Contained within a general text description there is also an order-specific reference number, which is not relevant for my purposes. I wish to find all of these numbers and replace them with nothing (i.e. retain the rest of the description).

The reference numbers are always in the format "P#####/##". Unfortunately these references are in the middle of the text field, not at the start or end, so I can't use a LEFT or RIGHT formula to delete them.

Once these reference numbers have been deleted I will then be able to filter for unique records only. When I do this at the moment the filtering has no effect due to these specific reference numbers.

I am using a pivot table to explore the relationship between the two variables in a survey. Question 1 is a "choose all that apply" question, while Question 2 is more "if you said yes to any in question 1, choose all that apply".

So, I have about 10 filters for question 1, where each combination will give me a different number for the responses for question 2. My question is this: How do I get excel to automatically find the # of individuals with the particular combination of filters in question 1?

Ie. if said yes to 3/10 options in question 1, how do I get excel to find out how many actually said yes to the 3/10 questions.

The purpose of this data is for reference to question #2, so that i can utilize some percentages.

This is for an online sports management game I play. Basically I have calculated each players skills in each position, and I need to find the best combination of the players on the field to give me the best team.

I have a table as below, and I need to find a solution that gives me what the best combination will be....

Can this be done in Excel? Using the digits 0,1,2,3,4,5,6,7,8,9 create all the permutations/combinations with limits on some of the digits. The digits 0,7,8,9 can only be used a max of 3 times in any one permutation/combination, digits 2,3,4,5,6 can only be used 4 time in any one permutaion/combination, producing a 5-digit string.

Example of expected results.

0 1 0 2 7

I am trying to create a list of permutations in a column for example I need a list of numbers 1-20 with no numbers repeating. This is causing my head to hurt and I have been working on this problem for some time.

View 9 Replies View RelatedI have been asked if I can create a pseudo Lottery/Bingo card of 7 images with no repeat cards. The best i can tell is that I need to create a Permutation of the numbers 1 - 7. There should be 5040 combinations of unique possible cards. My problem being I don't know how to create this Permutation in Excel.

View 4 Replies View Relatedi have read through all threads about permutation, and also a few others. I if I were an Excel Pro I would probably have been able to come up with a solution to my problem based on all the suggestions made, but unfortunately it is (still) all a bit too complex for me.

The problem:

I have between 2 and 5 lists of words, each list in one column:

Column A

red

green

yellow

black

blue green

pink

Column B

shirt

jumper

blouse

coat

t-shirt

skirt

Column C

for women

for men

for girls

extra large

for boys

one size fits all

Column D

I have several items that I would like to combine, lets call them characters A, B, C, D, E

Each character is situated in a different column, next to each other. Below, I would like to create a list of all possible combinations of these characters. The sequence is not important and each row should contain a unique combination of characters.

I have counted 31 combinations for the ABCDE set, namely

1 for ABCDE

5 for A, B, C, D, E each

5 for choosing 5 unique sets of four from a set of five (5!/(4!*(5-4)!)

10 for choosing 10 unique sets of three from a set of five (5!/(3!*(5-3)!)

10 for choosing 10 unique sets of two from a set of five (5!/(2!*(5-2)!)

To complicate matters, I have several other character strings where I would like a list of combinations. For example A, B, C, D, E, F, G, H 9 (a longer set).

By the way, each combination should be spread accross several columns (e.g. one colum per character, see the question marks in the table below) ....

getting All permutation and combinations of 4 letters and 4 numbers?

View 2 Replies View RelatedI'm new here, google helped me to find this place. Hope someone here can help me a bit on my excel spreadsheet. I have one list of numbers and it need to be sorted under Perm condition so the list become shorter. The function should go through the listed number and output new list after sorting it. I have attached my excel here.

View 7 Replies View RelatedI have found this very challenging, and have really confused my self on how to systematically approach this. I have the user enter the value in the black highlight boxes, some subtraction produces a base value, the user may also enter the tolerance of the working value (base value), effectivlly giving rise to a small range to generate the permutations from.

What I would like to do then is find all permutations of the inventory (letters in the sheet) with their corresponding values right above them to the small range determined via the user (working value and tolerance). There are also quantity limits for each item. There four basic rules that need to be adhered to:

1) Permutation can't have both S and PP, so one or the other

2) Sum of H and HN must be greater or equal to sum of S and PP

3) H or HN or both must be present, so their sum cannot be zero

4) If HN is less than or equal to 2, and H is greater than 2, then NA and NG must equal 0.

I have a formula that I can't get to paste successfully in the forum - it keeps getting cut off?!? ... but I think I can probably simplify my explanation to get the answer I want anyway.

I need to only show the value from AUS!$H$2:$H$17 if the C2 & D2 combination are the same as the AUS!$B$2:AUS!$B$17 & $AUS!$C$2:AUS!$C$17 combination.

I have 2 cells with numbers. In a 3rd cell I want to create a formula which looks at the 2 data cells and shows a value. The rules are the following: If C1 or C2 are bigger than Xthen C3=value1 else C3=value2. I have some basic excel knowledge but im not very familiar with functions. I'm using Excel 2007.

View 4 Replies View RelatedI need to consolidate several amount and make sure which of them falls into a sum of an amount.

I wonder if excel can find all the calculation in range A, and highlight those that equal to the cell D10 (example as per my attachment).

Calculation.xlsx

how to create a list (I know how to calulate the count) of combinations without repetition when choosing 2,3,4 and 5 words from a set of 5 in Excel 2007.

e.g. Alpha,Bravo,Charlie,Delta,End

(AlphaBravo=BravoAlpha)

Choosing 2 = 10

Choosing 3 = 10

Choosing 4 = 5

Choosing 5 = 1

I have data in a 5x5 area and I would like a VB Script or Function that can give every possible combination of one number from each column added together.

i.e.

500 400 300 200 100 1500

400 300 200 100 500 1900

300 200 100 500 400 1800

200 100 500 400 300 etc...

100 500 400 300 200

I have a list of numbers from 1-7 would look like this each number in a seperate cell.

3 5

1 2 3 5 6 7

2 4 5 6 7

6 7

4 6

6

I want to use one number from each row (which there is only 6 rows) and then find every number from 1-7 that will complete the sequence 1-7. So with the numbers above (using one number from each row) the only other numbers that could be used would be 3 or 5.

The combos that would work:

row 1 use 3 ----------- row 1 use 5

row 2 use 1 ----------- row 2 use 1

row 3 use 2 ----------- row 3 use 2

row 4 use 7 ----------- row 4 use 7

row 5 use 4 ----------- row 5 use 4

row 6 use 6 ---------- row 6 use 6

5 would complete ---------- 3 would complete

Remember the numbers and how many numbers in each row can change but will always be 1-7 and I always need to find every number that can complete the sequence 1-7 by using one number from each row.

on combination of numbers

on the extreme left column, i have 23 numbers from A1:A23. All 23 numbers are in the form of 4 digit. For example A1 there is 1234, i need to display the possible 3 digit combination of this in the same row (like say 123,124,234,134 in B1,C1,D1 AND E1).

Another example in A2 there is 3545, i need to display 354,455,355 in the same row in B2,C2,D2

I need to perform this operation for the 23 numbers on the extreme left row. Can give me some hint on the code.

I am trying to show the all possible combinations of a set of numbers in Excel, in my case I think permutations are more appropriate to use. For example: there are three numbers 1, 2, 3 I want to show results like:

1, 2, 3

1, 3, 2

2, 1, 3

2, 3, 1

3, 2, 1

3, 1, 2

The functions in Excel available only give the total number, but I want to see these combinations!

I was just wondering if it was possible to only allow cells in a worksheet to only allow values that are a combination of 2 arrays whether it be through data validation or other means. For example, if I have an array that has a b and c and a second one with 1 2 and 3, is it possible to only allow values a1 a2 a3 b1 b2 b3 c1 c2 c3?

View 2 Replies View RelatedI have set of people where by based on Level & designation want to find the percentile on their CTC.

Attached is the sample file. Percentile.xlsx

Can Offset be combined in an Index Match Match formula as per the attached sample?

View 4 Replies View RelatedI'm trying to use a combination of Hlookup and COUNTIF. I'm selecting a date value in a cell using data validation. I'm then wanting to write a formula to lookup that value in a row of dates, and then use a countif to find all the '1' values in that column.

View 6 Replies View RelatedIve attached my example but explaination of what i am trying to do is below:

In sheet 1 i have products listed with a product ref

In sheet 2 i have a list of features by product ref.

I want to be able to put each feature next to the relevant product in sheet 1, some products may have 3 features, others may have 5 or more.

I need combining sumif & sumproduct. I have attached a file which explains what I need.

View 2 Replies View RelatedI would like to check a combination of two cells, if these two cells are both empty (not zero, just blank) then it will return a blank in another cell. I tried using AND but am unsure how it works. I would like to use a "Case" Function.

Function FirstCheck(Count1, Count2)

Select Case FirstCheck

Case Count1 = "", Count2 = ""

FirstCheck = ""

Case Else

FirstCheck = Abs((Count1 - Count2) / (Count1 + Count2))

End Select

End Function

I have created a program where there is a spreadsheet containing all of the items in a loan tools store, which are issued out to people. I have created a "Search/Find" function within the "Issued Items" sheet. Within this search function, you are able to search all or any combination of the following criteria: Serial; Description; Name; Location. For example: If you just type data in the "Serial" field, it will just search that column and select the cells which contain that value.

The problem I am having is when searching multiple criteria, each and every cell in the columns which are searched is selected. Whereas, I would like only the cells which match all of the criteria to be selected.

For example: If I was to type "1" into the "Serial" field, "2" into the "Description" field, "Liam" into the "Name" field, and "Workshop" into the location field:

Current: Serial column is searched and all cells with "1" in are selected. Description column is searched and all cells with "2" in are selected. Name column is searched and all cells with "Liam" in are selected. Location column is searched and all cells with "Workshop" in are selected.

What I Would Like: Program to search each of the specified columns and only select data which meets the searched criteria. For example: Rows 20 & 28 to be selected as they both contain, Serial "1", Description "2", Name "Liam", Location "Workshop".

Note: The sheet will have password protection.

i've attached a worksheet yet removed my attempt at formulas as it would have made most of you cry... what i'd like to do is select an item from a dropdown list (B1) (that i've built and it works, phew) and display the summary data (B3:B10) from the column or sum of columns in array (A12:F21) as explained in the relationship matrix.

I've tried ifsum and dsum (copied in each cell B3 to B10 of course) yet it doesn't extract items from the array with the drop-down selection. nor does it add columns together.

I am trying to sum 12 columns based on looking up a reference that is in one column. Basically I have 2 files where on both files Column A has a G/L account number. On the data file I have credits for each month going from column C to Column O. On the other I have one column where I want to bring in the sum of all the months based on looking up the G/L number in column A.

View 4 Replies View RelatedMy Columns are as follows:

A1-Criminal Name, B1-Crime, C1-Age, D1-Ratings, E1-Punishment

In the punishment column one will get 22 years life imprisonment if he fulfills the following conditions.

1. He must have done Rape OR Murder

AND

2. His Age should be >30

AND

3. His Ratings should be>8

It should throw 22 years in the Punishment column only if the above conditions are met otherwise it should be Nil.

More Info on this:

1. Crime column includes Murder, Rape, Robbery, Assault, Kidnap etc

2. Age column ranging from 22-75 years.

3. Ratings column ranging from 1-10 points

4. There are 3400 records we have in the list

How to write an IF AND OR combination formula for this ?

I have to write a formula which states the following:

if cells AA1,AB1 &AC1 = 0 then "Slow-Moving",

if of these cells AA1,AB1 &AC1 contains a number then "OK",

if cells, AA1,AB1,AC1,Z1,X1,Y1 all = 0 then "Non-Moving"

I believe an If and AND combination could work but its not working for me.

The numbers are file attributes, as you know these are

Normal = 0

Read Only = 1

Hidden = 2

System = 4

Volume = 8

Directory = 16

Archive = 32

These numbers are cumulative, so if a file has an attribute of 5 it is Read Only and System (1 + 4), it can't be anything else. Or if it has an attribute of 6 it can only be Hidden and System (2 + 4).

What I need is a spreadsheet that calculates every possible combination of these numbers, so I can check my Select Case statement has covered all possible combinations.

If it was just a one off project I could just work it out "by hand", but I have realised that there are several other projects I have that this would be useful in.

e.g. I am doing a skills matrix at work. If I give each skill a number, then give each employee a cumulative total number then I can have a spreadsheet that shows their skills. For each employee number there will only be one possible combination of skill that add up to that number.

My employer often adds new skills, so each time this happens I will have to check every combination is covered.

So I really need a spreadsheet solution, something I can input a group of numbers and it will show me a list of every possible combination of those numbers. The number of numbers in the group will vary, so a solution that only works for a group of (say) 6 numbers won't work. It has to work on a variable group of numbers.

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