+ Reply to Thread
Results 1 to 4 of 4

Outputing significant figures to cell

  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 SP3
    Posts
    45

    Outputing significant figures to cell

    Hey there, I currently have a loop set up where a column in my sheet is updated with a track record number of the following format:


    Row A
    ALP1
    ALP2
    ALP3 and so on....

    but what I would like to do is make it so that it appears as below:

    Row A
    ALP0001
    ALP0002
    '
    '
    ALP1023 and so on...

    my sub I use to do this is of the form below:

    Please Login or Register  to view this content.
    How would I go about changing the output so that it would show as above??

    Any help would be greatly appreciated.

    Cheers!

    Jag

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Outputing significant figures to cell

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

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

    Re: Outputing significant figures to cell

    Try this:
    Please Login or Register  to view this content.
    E.g., =PadNums("ALP1", 4) returns ALP0001
    Last edited by shg; 09-24-2009 at 12:05 PM.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Office 2003 / Office 2007
    Posts
    114

    Re: Outputing significant figures to cell

    Please Login or Register  to view this content.
    This will pad the number for records up to 999999. You could extend this as far as you needed within reason. This will work with anything in the format of PrefixXXX where XXX is a number.

+ 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