Return all combinations

One Response to “Return all combinations”

  1. Oscar says:

    I am working on a udf version without Redim Preserve.

Leave a Reply

How to add vba code to your comment:
[vb 1="vbnet" language=","]
your code
[/vb]

How to add a picture to your comment:
Upload picture to postimage.org
Add picture link to comment.

How to upload a file
Upload file

Find numbers closest to sum

7 Responses to “Find numbers closest to sum”

  1. XOR LX says:

    Thanks, Oscar!

    Looks like you've managed to successfully amend the formula for this new condition (though what have you done with my Defined Names? :-)) Anyway, good work!

    Also, I like the fact that you've replaced the ROW/INDIRECT constructions in my solution with the preferred ROW/INDEX ones. I myself am using this version now, though I haven't got the time to go back into all of my old posts and update them all!

    Nice-looking site, by the way.

    Keep up the good work.

    Regards

  2. Oscar says:

    XOR LX,

    Thank you!

    though what have you done with my Defined Names? :-))
    Perhaps it is easier to use defined names, I don´t know. It sure makes the formula look smaller but I want to reveal the truth. ;-)

  3. Torstein says:

    Hi Oscar and XOR LX!
    I'm really impressed what you guys can do with excel formulas. I have been trying to figure out permutations for so long, but have not been able to make it.
    One question to the formulas: Is it possible to restrict solutions to those which have eg three numbers that adds to the total?
    Hope I make my self understood!
    Regards Torstein

    • Oscar says:

      Torstein,

      Thanks!

      This sheets allows you to specify the number of values you want, cell J1. If the target value is equal to the sum, cell M6 is formatted yellow. If not equal, cell M6 is colored red.

      I am sure this formula can be made smaller but I don´t know how to build a permutations array that only uses three out of 8 values, I leave that to XOR LX. :-)

      Download excel *.xlsx file
      Find numbers which are closest to a total_permut.xlsx

  4. XOR LX says:

    "I am sure this formula can be made smaller but I don´t know how to build a permutations array that only uses three out of 8 values, I leave that to XOR LX. :-)"

    That's precisely what I'm looking into now!

    Interesting exercise in itself.

    Bear with me!

    Cheers

  5. XOR LX says:

    Done!

    http://excelxor.com/2015/02/10/which-numbers-add-up-to-total-2-multiple-solutions/

    Haven't yet managed to reduce the required array of zeroes and ones, so queried it with a further IF clause. More resource, I'm afraid, though not a great deal by the looks of it. Functions quite nicely, actually. :-)

    I'll keep looking into ways in which we may be able to generate such reduced arrays, though. Interesting mathematical exercise!

    Enjoy for now!

Leave a Reply

How to add vba code to your comment:
[vb 1="vbnet" language=","]
your code
[/vb]

How to add a picture to your comment:
Upload picture to postimage.org
Add picture link to comment.

How to upload a file
Upload file

Filter duplicate files in a folder and sub folders

Leave a Reply

How to add vba code to your comment:
[vb 1="vbnet" language=","]
your code
[/vb]

How to add a picture to your comment:
Upload picture to postimage.org
Add picture link to comment.

How to upload a file
Upload file

Compare file names in two different folder locations and their sub folders

Leave a Reply

How to add vba code to your comment:
[vb 1="vbnet" language=","]
your code
[/vb]

How to add a picture to your comment:
Upload picture to postimage.org
Add picture link to comment.

How to upload a file
Upload file

Save selected sheets to a pdf file

2 Responses to “Save selected sheets to a pdf file”

  1. Bert van Zandbergen says:

    Hi Oscar
    First of all thanks for your beautiful macro to copy an Excel file to PDF. If you want to copy a wide horizontal field to PDF, it can cause a split in the PDF: you get divided the text, graphics and / or object on two pages). That's not what you want!

    To make a perfect horizontal layout, I recommend to define first in the worksheet: Print Range, Page Layout (on ribbon). Create with File / Print Options other necessary instructions, for example, choose settings like "print to fit", borders etc.etc. The actual print layout is displayed on the right side.

    Instead of a normal print, you can now activate the Macro. These simple adjustments don't give a distribution on two pages, but an appropriate horizontal PDF format. So, it's a contribution to your readers.

    Best regards,
    Bert van Zandbergen

Leave a Reply

How to add vba code to your comment:
[vb 1="vbnet" language=","]
your code
[/vb]

How to add a picture to your comment:
Upload picture to postimage.org
Add picture link to comment.

How to upload a file
Upload file