+ Reply to Thread
Results 1 to 11 of 11

Randomly Select the numbers.. less than 2955

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Randomly Select the numbers.. less than 2955

    Hai Friends..

    In my attached sheet..*
    If kgs are greater than 2955(Ending Digit 0 or 5), then it has to split the numbers in same vehicle.. as shown in sheet 2.. please suggest me..
    Answer is same like what I displayed in sheet 2.. what the data there in sheet 2 is answer.. Its random values.. but should be less than 2955(Ending Digit 0 or 5)


    Example

    let's take vehicle number KA 20 AA 003 as an example. It has 17,690 kgs.
    On Sheet2, this weight is distributed over 7 vehicles: 2945, 2880, 2690, 2955, 2895, 1660, 1665.

    KA 20 AA 003 2945
    KA 20 AA 003 2880
    KA 20 AA 003 2690 like that..
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Randomly Select the numbers.. less than 2955

    Hai All..

    Here is a file.. But there all the spliting number is displaying same values.. but I want different different numbers.. Please suggest me

    Thanking You
    Attached Files Attached Files

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,969

    Re: Randomly Select the numbers.. less than 2955

    It is very hard to understand your question. I don't know if it's because English is not your native language or it's just a confusing explanation.

    Is this what you are saying: You have a list of vehicle numbers. With each vehicle identification number there is a weight. If the weight is more than 2955, you want that vehicle number to be duplicated and the weight to be distributed among the duplicates so that the weight for each duplicate ends in 0 or 5 and each weight is 2955 or less.

    Here is the confusing part. How many duplicates should be created to distribute the weight? Is there a minimum weight? You say you want random weights that are all difference, but that would result in weights of 2910, 5, 155, for example.

    This will almost certainly require a VBA solution.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Randomly Select the numbers.. less than 2955

    Hai..

    If kgs more than 2955, then it has to distribute

    example..

    KA 20 AA 003 2945
    KA 20 AA 003 2880
    KA 20 AA 003 2690
    KA 20 AA 003 2955
    KA 20 AA 003 2895
    KA 20 AA 003 1660
    KA 20 AA 003 1665

    total : 17,690

    Thanking You

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,969

    Re: Randomly Select the numbers.. less than 2955

    You have not answered any of my questions.

  6. #6
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Randomly Select the numbers.. less than 2955

    "Here is the confusing part.
    1. How many duplicates should be created to distribute the weight?
    2.Is there a minimum weight?
    You say you want random weights that are all difference, but that would result in weights of 2910, 5, 155, for example."


    1. There is no number of fixed duplicates values. if kgs more than 2955, then it has to distribute ending with 0 or 5.
    example kgs 3085 then it distribute 1680 and 1405 (1680 & 1405 is not fixed, we can separate any number but should be less than 2955)

    2. Minimum weight is not there

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Randomly Select the numbers.. less than 2955

    if kgs more than 2955, then it has to distribute ending with 0 or 5.
    Why such a random rule?

    What if the total weight doesn't end in 0 or 5?
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Randomly Select the numbers.. less than 2955

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    1
    Date
    Vehicle Number
    Kgs
    Load 1
    Load 2
    Load 3
    Load 4
    Load 5
    Load 6
    Load 7
    2
    01 Jun 2016
    KA 20 AA 001
    1420
    DoNotUse
    1420
    E2: =MIN(2955, $C2 - SUM($D2:D2))
    3
    01 Jun 2016
    KA 20 AA 002
    2110
    DoNotUse
    2110
    4
    01 Jun 2016
    KA 20 AA 003
    17690
    DoNotUse
    2955
    2955
    2955
    2955
    2955
    2915
    5
    01 Jun 2016
    KA 20 AA 004
    4100
    DoNotUse
    2955
    1145
    6
    01 Jun 2016
    KA 20 AA 005
    4210
    DoNotUse
    2955
    1255
    7
    01 Jun 2016
    KA 20 AA 006
    5405
    DoNotUse
    2955
    2450
    8
    01 Jun 2016
    KA 20 AA 007
    3900
    DoNotUse
    2955
    945
    9
    01 Jun 2016
    KA 20 AA 008
    1680
    DoNotUse
    1680
    10
    01 Jun 2016
    KA 20 AA 009
    4995
    DoNotUse
    2955
    2040
    11
    01 Jun 2016
    KA 20 AA 010
    750
    DoNotUse
    750
    12
    01 Jun 2016
    KA 20 AA 011
    1505
    DoNotUse
    1505
    13
    01 Jun 2016
    KA 20 AA 012
    935
    DoNotUse
    935
    14
    01 Jun 2016
    KA 20 AA 013
    11365
    DoNotUse
    2955
    2955
    2955
    2500
    15
    01 Jun 2016
    KA 20 AA 014
    5240
    DoNotUse
    2955
    2285
    16
    01 Jun 2016
    KA 20 AA 015
    3635
    DoNotUse
    2955
    680
    17
    01 Jun 2016
    KA 20 AA 016
    1575
    DoNotUse
    1575
    18
    01 Jun 2016
    KA 20 AA 017
    17475
    DoNotUse
    2955
    2955
    2955
    2955
    2955
    2700
    19
    01 Jun 2016
    KA 20 AA 018
    11455
    DoNotUse
    2955
    2955
    2955
    2590
    20
    01 Jun 2016
    KA 20 AA 019
    12320
    DoNotUse
    2955
    2955
    2955
    2955
    500
    21
    01 Jun 2016
    KA 20 AA 020
    1125
    DoNotUse
    1125


    The cells are formatted as 0;; to suppress display of 0.

  9. #9
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Randomly Select the numbers.. less than 2955

    Hai Shg..

    weight is weighbridge(Vehicle Scale) values.. So it shows only ending with 0 and 5..

    Thanking You

  10. #10
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Randomly Select the numbers.. less than 2955

    Hai shg..

    example in 4th row 01 Jun 2016 KA 20 AA 003 17690 DoNotUse 2955 2955 2955 2955 2955 2915
    5 times 2955 repeated but I want diferent diferent values..

    Thanking You..

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Randomly Select the numbers.. less than 2955

    And why is that?

+ 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. select numbers randomly
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-20-2014, 07:03 PM
  2. Randomly select specific numbers from array
    By carbonboywonder in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2011, 09:56 AM
  3. select words randomly.
    By coolhit in forum Excel General
    Replies: 2
    Last Post: 02-02-2011, 06:17 PM
  4. Code to randomly select
    By fo05kka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2009, 07:22 PM
  5. randomly select numbers
    By jollycarrier in forum Excel General
    Replies: 2
    Last Post: 08-18-2006, 09:54 AM
  6. [SOLVED] to find missing serial numbers in randomly generated numbers
    By B.H. Hadi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2005, 07:00 PM
  7. Randomly select numbers
    By cmlm in forum Excel General
    Replies: 2
    Last Post: 04-22-2005, 03:36 PM
  8. select names randomly
    By jroque in forum Excel General
    Replies: 1
    Last Post: 01-26-2005, 08:40 PM

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