Results 1 to 6 of 6

Dispatching the numbers

Threaded View

  1. #1
    Registered User
    Join Date
    11-05-2023
    Location
    alg?rie
    MS-Off Ver
    office 2013
    Posts
    4

    Dispatching the numbers

    Good morning,

    Since I'm bad at VBA, I need your help.

    In cell S8 there is a numerical value which represents the number of columns authorized (manually editable value)
    In cell S9 there is a numerical value which represents the maximum number to distribute (manually editable value)
    In cell S10 there is a numerical value which represents the number of lines authorized (manually editable value)
    I want to randomly distribute (with a VBA button) the numbers from 01 up to the number in cell S9 in the range D9:M100 according to the following conditions:
    1- Random distribution in the range D9:M100 from 01 to cell number S9 in empty cells only and not repeating the same number in the same row, and replace the repeated number with another number
    2- The number of columns in which the distribution is authorized is equal to the number in cell S8
    3- The number of lines in which distribution is authorized is equal to the number in cell S10
    4- The number of columns entered in cell S8 does not exceed the number entered in S9, if otherwise an error message is displayed
    4 - The distribution is carried out only in the empty cells of the range D9:M100
    5 - Allow the number to be repeated only once in each column
    6 - compensation of cells containing letters with cells containing numbers at the end of the column (according to the conditions mentioned previously, with the exception of the condition of the number of lines).

    Attached the file

    Thank you.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. generate 100 random numbers of which 50 should be even numbers and 50 odd numbers
    By keahi32 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-26-2022, 12:42 PM
  2. I have
    By aslam5420 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-03-2022, 05:42 AM
  3. Replies: 4
    Last Post: 10-20-2020, 04:15 PM
  4. Replies: 4
    Last Post: 12-17-2015, 12:33 AM
  5. Replies: 8
    Last Post: 11-01-2012, 07:49 PM
  6. [SOLVED] How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2012, 11:59 AM
  7. Split data into multiple sheets - dispatching cases
    By badaza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2012, 11:22 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