+ Reply to Thread
Results 1 to 10 of 10

Generate Random code for sampling for Different operator

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Generate Random code for sampling for Different operator

    Dear VBA Expert
    I would like to know if someone have any idea how can create Random Code for 15 Operator
    operator name will be in column A
    Code will be generate in column B
    the code consist of Alphabetical, but the code not repeated in the same day
    please note that every day each operator will take two time sample meaning will generate two times for each one
    hope my explanation is clear for all
    regards

  2. #2
    Registered User
    Join Date
    09-20-2016
    Location
    bhopal
    MS-Off Ver
    2003
    Posts
    17

    Re: Generate Random code for sampling for Different operator

    Please post sample excel file & what result u want.

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    i already create the file with formula to generate code and make also Cell for inquiry that give me responding name
    the problem now when i enter any value in D2 automatic update for formula change value in Column B and when i make update manul
    also not working
    i think it will be better to create it by macro with buttom but i didnt know how can
    Attached Files Attached Files
    Last edited by mazan2010; 09-28-2016 at 02:08 AM.

  4. #4
    Registered User
    Join Date
    09-20-2016
    Location
    bhopal
    MS-Off Ver
    2003
    Posts
    17

    Re: Generate Random code for sampling for Different operator

    U should use formula RAND() with round() & concatenate with alphabet in cell B2 .

    Paste this in Cell C2 & paste down to last entry ...

    PS : once u get all random codes then use paste special as value so later no change occur in provided codes...
    [this requires no VB Code]:


    =LEFT(B2,1)&ROUND(RAND()*100000,0)

    Regards

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    if i paste it as value in the next time it not give me generation , i must enter the formula again

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    Dear all expert
    now my idea is completed for what excatly i need hope every one can understand what i want
    if Cell B1 is 200S divide number in column B4 to 150 because every BOX take 150 items for example in B4 contain 350
    which divide by 150 which give 2.3 meaning generate three code in cell C4,D4 &E4
    and ohter example B5 contain 250 which will generate only 2 code and leave third one empty
    the same will be in other Column G and L
    if the B1 contain 32S divide the number by 300 and create the same as above
    if the cell B1 is 16S divide by 150 also

    In Cell Q4 when i enter any code from Column H:O its give me responding name and shift number and box number
    all this Macro will be connected to button as in attached file which will make two function
    Stop randomize data generated and export it to new excel sheet with name from D1 (date)

    i found the following code to stop randomize data generated but i need other as i explain above
    HTML Code: 
    Attached Files Attached Files
    Last edited by mazan2010; 10-03-2016 at 02:41 AM.

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    hope someone can solve this for me

  8. #8
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    please can any one help me to make this

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    there is any one can help me to make action with macro
    or even give me another idea for give every operator at every shift code random

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate Random code for sampling for Different operator

    Please can any one help me to finish this work

+ 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. Random Sampling using vba. Please help me
    By jathind in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2015, 03:29 PM
  2. Random Sampling - please help
    By zakajam1980 in forum Excel General
    Replies: 4
    Last Post: 08-03-2013, 01:31 AM
  3. Help with random sampling, please.
    By tjroby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2013, 01:31 PM
  4. vba code to generate random z-scores for normal distribution
    By bruceday in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2012, 02:07 PM
  5. Random Sampling and averaging using VBA code
    By rahulk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2009, 02:49 PM
  6. Random Sampling in Excel
    By rahulk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2009, 12:48 AM
  7. Random Sampling
    By orangeIV in forum Excel General
    Replies: 2
    Last Post: 03-26-2007, 11:59 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