Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Permutations, Array, For...Next, etc.

I have two columns of data that have repeating values(columns B and D). Both
are the same length. I want to find all the permutations of this data,
specifically the values of column D minus column B.

What I have done so far is made an array of all of the differences that can
exist. My problem is I want to take a value from column 1 of the new array,
then a different value from column 2, etc. without duplicating any of the row
values. I have started to do this using For...next, however with 50 columns
and rows it will be a lot of code to type 50 for...next commands with 50
boolean statements to assure that the data doesn't repeat. Is there a better
way to do this or should I start typing ASAP?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Permutations, Array, For...Next, etc.

Bernie,
I am trying to change the orientation of the values in each column so I have
the fewest different values in a third column. The third column would be the
values from column D minus column B. I have tried different methods and the
best one I have found is to make all possible tables and then select the best
from that. This is in VBA as well...

Thanks,
James

"Bernie Deitrick" wrote:

James,

What is it that you are trying to do? Finding all the permutations of 50 different numbers can
involve a lot of numbers - more that Excel can handle. Are you trying to find a specific sum,
perhaps?

HTH,
Bernie
MS Excel MVP


"James Michael" <James wrote in message
...
I have two columns of data that have repeating values(columns B and D). Both
are the same length. I want to find all the permutations of this data,
specifically the values of column D minus column B.

What I have done so far is made an array of all of the differences that can
exist. My problem is I want to take a value from column 1 of the new array,
then a different value from column 2, etc. without duplicating any of the row
values. I have started to do this using For...next, however with 50 columns
and rows it will be a lot of code to type 50 for...next commands with 50
boolean statements to assure that the data doesn't repeat. Is there a better
way to do this or should I start typing ASAP?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Permutations, Array, For...Next, etc.

James,

Try sorting both sets (Columns B and D) in the same manner, or matching pairs of equal numbers, then
close numbers, etc. Beyond that, I can't imagine that Excel will be able to handle this problem:
there are just too many ways to combine two sets of 50 numbers to be able to calculate the best
possible.

HTH,
Bernie
MS Excel MVP


"James Michael" wrote in message
...
Bernie,
I am trying to change the orientation of the values in each column so I have
the fewest different values in a third column. The third column would be the
values from column D minus column B. I have tried different methods and the
best one I have found is to make all possible tables and then select the best
from that. This is in VBA as well...

Thanks,
James

"Bernie Deitrick" wrote:

James,

What is it that you are trying to do? Finding all the permutations of 50 different numbers can
involve a lot of numbers - more that Excel can handle. Are you trying to find a specific sum,
perhaps?

HTH,
Bernie
MS Excel MVP


"James Michael" <James wrote in message
...
I have two columns of data that have repeating values(columns B and D). Both
are the same length. I want to find all the permutations of this data,
specifically the values of column D minus column B.

What I have done so far is made an array of all of the differences that can
exist. My problem is I want to take a value from column 1 of the new array,
then a different value from column 2, etc. without duplicating any of the row
values. I have started to do this using For...next, however with 50 columns
and rows it will be a lot of code to type 50 for...next commands with 50
boolean statements to assure that the data doesn't repeat. Is there a better
way to do this or should I start typing ASAP?






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
Permutations John[_33_] Excel Worksheet Functions 2 January 31st 10 09:49 PM
Permutations of an array element < to a value Bruce Excel Worksheet Functions 3 January 31st 06 04:00 PM
Permutations RedChequer Excel Worksheet Functions 9 September 26th 05 03:14 AM
Permutations RedChequer Excel Worksheet Functions 2 September 25th 05 04:05 AM
Permutations Henrik Excel Programming 3 December 2nd 04 05:32 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"