+ Reply to Thread
Results 1 to 3 of 3

Adding smallest value + second smallest value until exceeding a specific value

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    13

    Adding smallest value + second smallest value until exceeding a specific value

    Hello,

    I have been trying to create 'do while' loop to create a counting mechanism for the smallest number and then the second smallest number.

    What I would like to do is take the smallest value from A2 down till the bottom filled row and then find the smallest number, add that to the second smallest, add that to the third smallest, etc. until I go over a specifically set value. Just call that maximum. What I finally need is the number (n) that smallest number has been counting.
    Example if my numbers were: and maximum is <=10:

    1
    4
    7
    9
    2
    3
    5


    1+2+3+4...... then n=4.

    How can I write this in VBA?

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding smallest value + second smallest value until exceeding a specific value

    ..........
    Last edited by jindon; 10-22-2012 at 08:48 AM.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding smallest value + second smallest value until exceeding a specific value

    Something like this
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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