Link to home
Start Free TrialLog in
Avatar of Pedro
Pedro

asked on

Automate selection and paging process

The attached excel file contains a script that will take a range of numbers and create combinations based on those numbers. The goal here is to automate the process.

For instance,

Using B10:AG10 create combinations based those numbers in a page named 'Numbers_1'.
Using B11:AG11 create combinations based those numbers in a page named 'Numbers_2'.
Using B12:AG12 create combinations based those numbers in a page named 'Numbers_3'.

etc, etc, until it is finished. When it is finished there should be 10 separately numbered pages with the respective combinations.
CreateCominations.xlsm
Avatar of [ fanpages ]
[ fanpages ]

Given the misunderstanding/miscommunication in your previous question thread, I would like to clarify if the sample workbook provided is, in fact, a representative sample of the data/layout/format &/or content of the actual workbook you will be using.
Avatar of Pedro

ASKER

If you mean does sheet 1 represent the data to be analyzed then yes.

The outcome of the data will be combinations of 5 numbers culled from that data.

You can run the script included to see the expected result. The result should be placed on the pages after the first page so not to confuse the data. I hope that clarifies it for you.
Avatar of Pedro

ASKER

Fanpages,

Do you intend to work on this?
...and do you wish to retain the data created within the [Numbers_1] to [Numbers_10] worksheets if you re-execute the creation of combinations, or should those worksheets be deleted & re-created on each successive execution.

Additionally, are there any other requirements you have not stated already?
Fanpages,

Do you intend to work on this?

I am keen not to repeat the experience in the earlier question where you added to the requirements, failed to provide exact details, & accepted another solution even after confirming that my previously provided code was functioning as you had originally requested.

This may be a recurring nature of your questions, so I would like to clarify all the requirements in advance.
Avatar of Pedro

ASKER

I any event where the script is looking for specific placement simply let me know just to avoid Any misunderstandings. I will assume you're still working on the code and await your code posting.

Thank you
I am still waiting for your response to my query from earlier today:

...and do you wish to retain the data created within the [Numbers_1] to [Numbers_10] worksheets if you re-execute the creation of combinations, or should those worksheets be deleted & re-created on each successive execution.
Avatar of Pedro

ASKER

Delete and recreate on each successive execution
Avatar of Pedro

ASKER

fanpages,

Any idea of when this item will be scripted?

Pedro
Hi,

In response to your request for attention (yesterday), "Fanpages is not responding. Is it possible to have someone else assigned to this project?", anybody may contribute to this thread.  I have not taken "ownership"; I never do.  There is never just a single party assigned to answering questions.  I am not assigned to any project at Experts-Exchange.  I am here as a volunteer.

I do try to offer suggestions/proposals to meet requirements within the same week they have been asked, if I am able to, but this is not possible on every occasion.

Please let me re-read the thread, look at your attachment, & remind myself of what you require, & I will endeavour to respond with some Visual Basic for Applications code applied to the original workbook within the next 24 hours or so.

As I said though, any other member of the site may also contribute in the meantime.

BFN,

fp.
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pedro

ASKER

After running the code it displays error:

Compile error:

Ambiguous name detected: CreateCombinations

and highlights the following:

Private Sub CreateCombinations(Optional ByRef rSrc As Range = Nothing, _
                               Optional ByRef rDst As Range = Nothing, _
                               Optional ByVal nDim As Long = 0&)  

Do I need to change the name of anything to march so I do not get this error?
I am guessing that you have copied the code from my workbook  (attached above), to your own workbook (where the CreateCombinations() subroutine is already present within the "Module1" code module).

Please ensure that the CreateCombinations() subroutine within the "basQ_28233532" code module is the only Public subroutine of that name in the VBProject.

If CreateCombinations() is the only subroutine or function within "Module1", simply delete that code module.
Avatar of Pedro

ASKER

fanpages,

Once again you saved the day. After running it as you intended it works as planned.

Thank you very much for all your time and effort!