+ Reply to Thread
Results 1 to 8 of 8

Number generation

  1. #1
    Registered User
    Join Date
    10-06-2015
    Location
    Surrey, England
    MS-Off Ver
    MS 2010
    Posts
    3

    Number generation

    Afternoon,

    I am trying to generate a drawing number through excel. There are 9 sections for generating each unique number within the final drawing number. So section one would be the first digit in the drawing number, 2nd section would be the second digit in the drawing number and so on.

    Each section has a list of parts and I have labelled each part 1-7. So in section when I put in a quantity of one within the part number and the said part number is labelled 2 then the drawing number would start with a 2. I'd work my way through each section and then hopefully have a drawing number 9 digits long (123456789).

    Is there a way of generating this on Excel?

    Andy

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Number generation

    It's a bit tricky without seeing an example sheet, but try something like this:

    Some assumptions:
    - Your part numbers are just numbers (i.e. '1', '2', etc - not something like '1-top', '2-left', etc)
    - The part numbers are in A1, B1, C1, D1, E1, F1, G1
    - You want the answer in A2

    In A2, put this:
    =A1&B1&C1&D1&E1&F1&G1

    If the first assumption is wrong, then the formula will need amending. I'm travelling shortly, so will be off the forum, but someone else on here will be able to help if that's needed - or I'll be back on tomorrow pm.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Number generation

    Sounds it is possible, as you havejust single digits in each section(and don't have 0 in first section) you can get a number by concatenating all partial values, like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Registered User
    Join Date
    10-06-2015
    Location
    Surrey, England
    MS-Off Ver
    MS 2010
    Posts
    3

    Re: Number generation

    I've tried to upload and example spreadsheet but nothings happening.

    A1=part number
    B1=Quantity
    C1=Unique number in section
    D1=Final Unique number

    This is section one put a quantity in B4 which has a unique number of 3. The number 3 would then would be visible in D4

    that is section one complete and i'd continue to do that for the next section. Eventually down the bottom in column D I will have a cell that displays the final drawing number.

    so you would have in column D 9 digits.

    What formula would I need to put in the cell the final drawing number?

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Number generation

    Let's try with attachment:

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    upload and close

    remember to keep file size reasonable.

  6. #6
    Registered User
    Join Date
    10-06-2015
    Location
    Surrey, England
    MS-Off Ver
    MS 2010
    Posts
    3

    Re: Number generation

    example.xlsx

    Kaper,

    See attached.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Number generation

    Perhaps this will work for you.
    Enter this formula in a place convenient to calculate the number from the values in column E and fill across. This is an Array formula that is entered with Ctrl+Shift+Enter. For the example, I entered this in A100
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Enter this formula in E101
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Number generation

    Similar, but a bit different aproach:
    Assuming column E is empty:
    1) Select 9 cells in one column (say range A102:A110).
    2) Having this 9 cells selected enter the formula and commit it with Ctrl+Shift+Enter - it is array forrmula. Important note - not enter array formula to one cell and copy down. do as I wrote - select all 9 cells and then enter one formula for 9 cells.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This way you have all 9 digits listed starting from position of singles, to tens, hundreds, ...
    3) And in E101 standard formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that first argument is 10^{0,1,2... so it is {1,10,100,...
    Attached Files Attached Files
    Last edited by Kaper; 10-07-2015 at 02:40 AM.

+ 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] Random number generation
    By jas5432 in forum Excel General
    Replies: 6
    Last Post: 02-15-2014, 11:00 PM
  2. Random Number Generation
    By RalphJ in forum Excel General
    Replies: 1
    Last Post: 06-25-2010, 12:51 PM
  3. automated ref number generation
    By Sal_m_78 in forum Excel General
    Replies: 16
    Last Post: 10-09-2009, 09:31 AM
  4. Automatic number generation.
    By BM in forum Excel General
    Replies: 1
    Last Post: 08-14-2006, 09:40 AM
  5. Random Number Generation
    By MB06 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2006, 04:45 PM
  6. random number generation
    By scotjo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2006, 12:10 PM
  7. I need help with random number generation
    By David Stoddard in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-28-2005, 03:06 AM
  8. Random number generation
    By Stratuser in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2005, 09:06 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