+ Reply to Thread
Results 1 to 3 of 3

best double decks

  1. #1
    Registered User
    Join Date
    03-22-2019
    Location
    Arkansas
    MS-Off Ver
    office 365
    Posts
    1

    best double decks

    I understand there is software that does this, but i would like to change stuff from time to time.
    Im trying to maximize a group of numbers added together that doesn't go over 152"
    I used to have this VBA code but got lost and i just cant remember it since my heart attack.
    Like what are the maximum doubles that i can stack together that doesn't go over 152"?

    70
    70
    65
    57
    57
    57
    57
    75
    75
    75
    75
    75
    69.5
    75
    57
    57
    57
    57
    57
    57
    57
    96
    96
    96
    96
    96
    96
    96

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: best double decks

    Hello krturner and Welcome to Excel Forum.
    I am confused as to what is meant by 'maximum doubles' when the list of numbers includes some that are used an odd number of times (i.e. 75 appears five times).
    Here is my interpretation of a solution to the question, somewhat disregarding the list of numbers.
    Column A has a list of doubles populated using: =ROUNDUP(ROWS(A$1:A1)/2,0)
    Column B has a running sum populated using: =SUM(A$1:A1)
    Column C is populated using: =MOD(ROWS(A$1:A1),2)
    D1 contains the Max number (152)
    F1 contains the value of the last double, and therefore the number of doubles that can be stacked and not exceed the max number, using: =AGGREGATE(14,6,A1:A100/(B1:B100<=D1)/(C1:C100=0),1)
    If this isn't what you are seeking, please upload a sample (not a picture or pasted copy) by clicking on the GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window. Manually place the results that you want so that we can attempt to replicate them using formula(s)/code.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: best double decks

    My 2 cents.

    Test1 does a single run(i.e A1 summed with each number in column A including itself) giving 21 results

    Test2 sums each number in column A with each number in column A, including itself. This gives 441 results.

    Test3 sums each number with all the numbers below it.
    A1 sums with A2, A3, ....
    A2 sums with A3, A4, ....
    A3 sums with A4, A5, ....

    I think the last one is the most accurate because A1 + A2 is in essence the same as A2 + A1

    Please Login or Register  to view this content.
    Last edited by bakerman2; 03-25-2019 at 09:24 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Double Click one sheet and replicate Double Click "mark" on other sheets
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2018, 08:43 AM
  2. Double click cell - copy data to new sheet - create a list from double clicking
    By kakky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2015, 11:14 PM
  3. [SOLVED] Before double click event with if statements (Double clicking blank cell stops bdc firing)
    By camdenpars in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2014, 09:03 AM
  4. Changing cell properties with double click, then revert with another double click
    By mweber2525 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-01-2014, 01:40 PM
  5. Copy double-clicked cell to next empty row in different sheet with each double-click
    By erhathaway in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-25-2013, 12:06 AM
  6. Double stack and double line graph
    By Karen311261 in forum Excel General
    Replies: 5
    Last Post: 10-06-2010, 11:58 AM
  7. Double Locks ? Double Trouble
    By JXBlack in forum Excel General
    Replies: 1
    Last Post: 10-04-2009, 03:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1