Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, So sorry for not making it clear enough. 1) My actual code will have all the way til Q10. Hence the time taken for running the code will be too long. Thus, it will be ideal if only the relevant combinations (those that satisfy the equation) are generated, instead of ignoring those irrelevant ones after generation. 2) This code is actually not meant to write to worksheet. It forms part of the code for a larger code that will make further calculations and stuff. It is a program to churn out an ideal solution for an engineering problem as part of my final year project in my undergraduate studies. Gazillion thanks for your attention and help! Warmest Regards, Kenneth Tom Ogilvy Wrote: Sub AAA() Dim i As Double, j As Double, k As Double Dim l As Long, Q As Double Q = 6 i = 1 j = 1.5 k = 2 l = 2 Do While Application.Round(i, 1) <= 2 Do While Application.Round(j, 1) <= 5 Do While Application.Round(k, 1) <= 4 If Application.Round(i + j + k, 1) = Q Then Cells(l, 1) = i Cells(l, 2) = j Cells(l, 3) = k Cells(l, 4) = i + j + k l = l + 1 End If k = k + 0.1 Loop k = 2 j = j + 0.1 Loop j = 1.5 i = i + 0.1 Loop End Sub -- Regards, Tom Ogilvy "highjumper" wrote in message ... Anybody? Please help ... :) -- highjumper ------------------------------------------------------------------------ highjumper's Profile: http://www.excelforum.com/member.php...o&userid=26516 View this thread: http://www.excelforum.com/showthread...hreadid=397849 -- highjumper ------------------------------------------------------------------------ highjumper's Profile: http://www.excelforum.com/member.php...o&userid=26516 View this thread: http://www.excelforum.com/showthread...hreadid=397849 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combinations | Excel Worksheet Functions | |||
Sum of combinations | Excel Discussion (Misc queries) | |||
Sum of all combinations | Excel Discussion (Misc queries) | |||
a problem in generating a list of all of the possible combinations of those words | Excel Programming | |||
Overlapping combinations problem | Excel Programming |