View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Adding, multiple datasets to include all combinations

Okay, put this formula in D1:

=INDIRECT("A"&MOD(INT((ROW(A1)-1)/(COUNTA(B:B)*COUNTA(C:C))),COUNTA
(A:A))+1)+INDIRECT("B"&MOD(INT((ROW(A1)-1)/COUNTA(C:C)),COUNTA(B:B))
+1)+INDIRECT("C"&MOD(ROW(A1)-1,COUNTA(C:C))+1)

and copy it down.

This assumes that you have no headers, so that your data begins in row
1.

Hope this helps.

Pete


On Feb 4, 6:14*am, K wrote:
Yes exactly that format and yes I know it's unfortunately 50000!
Thanks in advance



"Pete_UK" wrote:
This will give you 40 x 50 x 25 different combinations. Are you sure
you want a list 50,000 items?


If so, give me some details of how your data is laid out. I did
something similar last week for a poster, and if your data is
something like this:


* A_B * * *B_C * * * C_D
* time * * *time * * * time
* time * * *time * * * time
(to 40) * *(to 50) * *(to 25)


then I can adapt it for you to go into column D - one formula copied
down.


Hope this helps.


Pete


On Feb 3, 11:15 pm, K wrote:
I have 40 observed travel times for A to B, 50 for B to C and 25 for C to D. *
Is there a way in Excel to calculate a list of all the possible total travel
times from A to D?
Thanks.- Hide quoted text -


- Show quoted text -