Format a cell to accept text/number sequence

I am currrently producing a spreadsheet and need to format a column to be able to automate a list of text/numbers with the number at the end being consecutive: ie-
Pem-070412-CSP-A-001, Pem-070412-CSP-A-002 etc?
When I have entered the first number and then drag the corner of the box down it misses out the two zeros in front of 2, 3 etc?
I am sure that this is quite simple to achieve but for the life of me I cannot figure it out.
Many thanks in advance.
Derek

The auto-increment feature isn't working well for your sequence.  Not much you can do about that so you'll have to work around it. 
One solution:
Put Pem-070412-CSP-A in column A
Put 001 in column B and format the column with a special format that makes it three digits with leading zeros for unused digits (see the screenshot). Copy/drag that cell to the next row down and change that one to a 2. Select both then drag down to create your sequence of three digit numbers.
Column C formula = A & "-" & B
Another solution:
Put Pem-070412-CSP-A in column A
Put a 1 in column B of the same row and 2 in the row below. Select both and drag down to create the numerical sequence
Column C formula =A& "-" & CHOOSE(LEN(B),"00","0","") & B
In either case, you don't really need a column A full of "Pem-070412-CSP-A". You could just do the sequence of numbers in column A and use ="Pem-070412-CSP-" & A to create your strings.
In either case, you could use a formula like  =B2+1 to create the sequence of numbers instead of doing it the way described above.
If you don't want all that stuff in your table, you can copy the completed sequences from column C, paste values (not paste) them into column A, then delete columns B and C.

Similar Messages

  • How can I format a cell in Numbers to have leading zeros in a number?

    I imported a spreadsheet from Excel (Office 2014, Win 7) through iCloud and some numbers were formatted to have leading zeros (012358) in the original Excel file but the leading zero format was lost in Numbers.  Is there a way to format cells to have a number displayed with the leading zero in Numbers?  The leading zero is part of an identification and is important to the numbers (0027 is not the same as 27 in these records).
    thanks,
    Bob

    James has the formating part, but if you already did the import you can use the following formula to replace the zeros that were leading if you know it is a four digit reference number....
    =right("000" & A2,4)
    copy those values into your text formatted column from James' answer and you got it.
    Jason

  • MT940 format on Statement Number/Sequence Number

    Hi Expert,
    I have the following EBS source file, which has 2 sequence numbers:
    As you can read that the section of :28C is the section of Statement Number/Sequence Number.  According to MT940 standard, as follows:
    This field contains the sequential number of the statement, optionally followed by the sequence number of the message within that statement when more than one message is sent for one statement.   The statement number should be reset to 1 on 1 January of each year.
    The sequence number always starts with 001. When several messages are sent to convey information about a single statement, the first message must contain '/001' in Sequence Number.
    One SWIFT message may contain up to 2000 characters.
    My source file's Statement Number/Sequence Number is correct, which caontains 1 statment (00006) and 2 sequence number which are: 00001 and 00002.  But during EBS upload using FF_5, system only managed upload first portion of the source file, and when come to second portion, 00006/00002, it always says ERROR: EBS (00006) already exist.
    But, based on MT940 standard, it should be OK.
    Therefore, does anyone have any idea why SAP FF_5 cannot handle the EBS source file upload?  Any further settings / configuration in order to hanlde Statement Number/Sequence Number?
    Thanks in advance
    sbmel

    Hello,
    I have encountered the same issue on MT940 with statement number/sequence number in field 28C.
    Our bank sends us MT940 into 17 separate files with sequence number for the same statement number (i.e. 13040/0001, 13040/0002..... and so on) while following the rule as below
    intermediate closing balance must have code :62M:
    and intermediate opening balance must have code :60M:
    finalclosing balance must have code :62F:
    and initial opening balance must have code :60F:
    However, the upload of first file in FF_5 terminated with error FV151 Termination in statement no.acct .... ; closing record 62F missing and subsequent files are with FV150 missing beginning record 60F.
    Would you please share your expertise on how you managed to make FF_5 accept these MT940 files with sequence number?
    Thanks in advance for your help on this.
    Regards
    Taro

  • Format a cell containing a number

    How can I accomplish so that the cell shows 001 instead of 1?

    It's best to pre-format the such cells as Text. If you have just the occasional need, you can change the format to text on the fly by typing a leading single quote. '008 will show as 008 with the format changed from Automatic to Text.
    Jerry

  • How to format a cell in a second table to show m3 as m³

    I can make an "own format" but I need it too often.
    So it will be much work.
    After I change the first cell to other text, the "own format" wil be shown a wrong Text in this second table-cell.
    So, how else?

    To get the number in to superscript you can use the keys Ctrl + Cmd + plus sign. Press the keys just before writing the number and then gain just after to get the coming text in normal format
    I am not sure I understood all of your post. If there is another hidden question please repeat it.

  • Convert contents of a formatted excel cell to HTML format

    Hi All,
    Background: I am writing a script that uploads some test cases written in excel into Quality Center. For those who are familiar with the QC Excel Addin, this script would do a pretty similar job except for reducing
    the steps involved. I'm using Office 2007 running on Win 7 Pro.
    Need: I have a situation where the contents of a formatted excel cell need to be converted to HTML tags representing the same formattin in the excel cell. For example a cell containg the text: "Verify
    if help topics in Macro section are
    hyperlinked" should be converted to
    <html><b>Verify</b> if help topics in <u>Macro section</u> are <i>hyperlinked</i></html> 
    Question: Is there an inbuilt function in Excel/VBAn accomplish this? Or is a macro required? Any other ideas to accomplish this?
    Note: Whatever used for converting (an inbuilt function or a macro) should support new line characters and colors.
    Any help or redirection to solutions is appreciated.
    Thanks, John.
    --Thanks, John Jacob Tharakan

    Here is the function I wrote. This handles the conversion character by character.
    Function fnConvert2HTML(myCell As Range) As String
    Dim bldTagOn, itlTagOn, ulnTagOn, colTagOn As Boolean
    Dim i, chrCount As Integer
    Dim chrCol, chrLastCol, htmlTxt As String
    bldTagOn = False
    itlTagOn = False
    ulnTagOn = False
    colTagOn = False
    chrCol = "NONE"
    htmlTxt = "<html>"
    chrCount = myCell.Characters.Count
    For i = 1 To chrCount
    With myCell.Characters(i, 1)
    If (.Font.Color) Then
    chrCol = fnGetCol(.Font.Color)
    If Not colTagOn Then
    htmlTxt = htmlTxt & "<font color=#" & chrCol & ">"
    colTagOn = True
    Else
    If chrCol <> chrLastCol Then htmlTxt = htmlTxt & "</font><font color=#" & chrCol & ">"
    End If
    Else
    chrCol = "NONE"
    If colTagOn Then
    htmlTxt = htmlTxt & "</font>"
    colTagOn = False
    End If
    End If
    chrLastCol = chrCol
    If .Font.Bold = True Then
    If Not bldTagOn Then
    htmlTxt = htmlTxt & "<b>"
    bldTagOn = True
    End If
    Else
    If bldTagOn Then
    htmlTxt = htmlTxt & "</b>"
    bldTagOn = False
    End If
    End If
    If .Font.Italic = True Then
    If Not itlTagOn Then
    htmlTxt = htmlTxt & "<i>"
    itlTagOn = True
    End If
    Else
    If itlTagOn Then
    htmlTxt = htmlTxt & "</i>"
    itlTagOn = False
    End If
    End If
    If .Font.Underline > 0 Then
    If Not ulnTagOn Then
    htmlTxt = htmlTxt & "<u>"
    ulnTagOn = True
    End If
    Else
    If ulnTagOn Then
    htmlTxt = htmlTxt & "</u>"
    ulnTagOn = False
    End If
    End If
    If (Asc(.Text) = 10) Then
    htmlTxt = htmlTxt & "<br>"
    Else
    htmlTxt = htmlTxt & .Text
    End If
    End With
    Next
    If colTagOn Then
    htmlTxt = htmlTxt & "</font>"
    colTagOn = False
    End If
    If bldTagOn Then
    htmlTxt = htmlTxt & "</b>"
    bldTagOn = False
    End If
    If itlTagOn Then
    htmlTxt = htmlTxt & "</i>"
    itlTagOn = False
    End If
    If ulnTagOn Then
    htmlTxt = htmlTxt & "</u>"
    ulnTagOn = False
    End If
    htmlTxt = htmlTxt & "</html>"
    fnConvert2HTML = htmlTxt
    End Function
    Function fnGetCol(strCol As String) As String
    Dim rVal, gVal, bVal As String
    strCol = Right("000000" & Hex(strCol), 6)
    bVal = Left(strCol, 2)
    gVal = Mid(strCol, 3, 2)
    rVal = Right(strCol, 2)
    fnGetCol = rVal & gVal & bVal
    End Function
    --Thanks, John Jacob Tharakan

  • I just got a new iphone 4 for att and my friend installed the sim card in it for me. the imessage function isnt connecting with the my cell number. a while back i had logged into my apple account on someone elses cell phone and their number keeps showing.

    i just got a new iphone 4 for att and my friend installed the sim card in it for me. the imessage function isnt connecting with the my cell number. a while back i had logged into my apple account on someone elses cell phone and their number keeps showing. when i try to just select my number to send and recieve imessages from it will not show up. i can send and recieve regular text but not pictures or imessage. i have tried logging off and restarting and nothing has worked.help please!!

    Did you remove your account information from the other person's iPhone?

  • Cell border and text buttons.

    Dear members:
    I am a beginner and have just started using Dreamweaver.
    After a few attempts and some reading I decided to post a message
    with questions on a couple of problems I haven't been able to find
    answers for.
    The first one relates to table cell formating. I have tried
    to set border properties for individual table cells but haven't
    been able to. I would like to be able to set individual border
    thickness and border color values for different cells in a table.
    How is this done ? I have selected the cells I wish to format but
    the property window shows color but not border thickness value. Any
    ideas ?
    The second issue relates to text rollover buttons. I wish to
    create simple navigational buttons in a web site created from text
    placed in table cells. The text should be created as one color
    (gray) for the "up" state and then change to a different color as
    the state changes to "over" and "down". I have looked at Flash
    buttons but they are not exactly what I want and don't offer the
    option I am looking for. Flash text also doesn't allow me to set
    behaviors as most behaviors appear grayed and non-selectable. How
    can I create rollover buttons from simple text that changes color
    and style (normal, bold, italic) with state changes ?
    Any help will be very appreciated. I apologize if these
    questions seem basic but I am beginning to work with Dreamweaver.
    Thank you in advance,
    Joseph Chamberlain

    These may help -
    http://www.projectseven.com/tutorials/css/qdmacfly/index.htm
    http://www.macromedia.com/devnet/mx/dreamweaver/css.html
    http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
    http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "FreakyJesus" <[email protected]> wrote in
    message
    news:ec1dq8$gjo$[email protected]..
    > The answer to your table cell borders question is CSS.
    Do you know much
    > about
    > that? It will allow you to define all the cell styles
    you want, and then
    > you
    > apply those styles to the cells in question.
    > Your text question can be done a few ways, but again CSS
    is the answer. If
    > you
    > don't know anything at all about it - go look - you'll
    be using it again
    > and
    > again so it's well worth your time.
    > If you know about css and need help with the specifics,
    then post back and
    > we
    > can try some stuff out.
    >
    > Andy
    >

  • How do I remove a number sequence using batch rename

    Hi
    I know I've done this in the past but cannot seem to work it out today.
    I have a series of images "_####_[layercompName].png".  I would like to remove the underscores and numbers.  The underscores removal is easy, but how do I remove the numbers (####) when they are different for each filename?  I would like the end result to be [layercompName].png
    The reason I have these filenames in the first place is that I have run the photoshop script "layer comps to files", and this adds a number sequence prefix.  I have tried to alter the script following various instructions I've found from trawling the internet (this one included How do you remove the number sequence when exporting layer comps to files? CS6. Windows 8.) but without any luck.  So now I'm resorting to batch renaming in Bridge.
    Thanks!

    Here you go, taken straight from: DesignEasy: How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps
    Run Adobe Bridge and navigate to the folder with exported files.
    Select all files which have sequence numbers.
    Go to Tools > Batch Rename.
    Choose: String Substitution from the first drop-down list in New Filenamessection. From the second drop-down choose: Original Filename. In the Find: text field type: _\d{4}_ (underscore, backslash, letter d, open bracket, number four, closed bracket, underscore). Leave Replace with: text field blank. Ensure that you have Replace All and Use Regular Expression checked as shown on the screenshot below.
    Click on the Preview button in the top right corner and ensure that files will be renamed as you want.
    Click on Rename button and you are done.
    In case you are first time doing this and you still have doubts if everything will work as expected, check Copy to other folder option when renaming files. This option is located near the top left corner under: Destination Folder.
    Another thing I want to mention is to remove everything that you have below String Substitution options. In case you see additional renaming options just click on minus (-) sign on the right side to remove them.
    How to remove/substitute empty spaces in the file name using Adobe Bridge
    It is pretty similar process. The only difference is that you should type: \s (backslash followed with letter s) in the Find: text field. You can leave Replace with: text field blank or to type underscore.

  • Display cell contents as text instead of evaluating as a numeric expression

    If I enter a value such as 21/27 in a cell, Numbers interprets it as 21 divided by 27 and displays the result, but that's not what I want.  I want 21/27 to be displayed.  How can I do that?
    Thanks,
    Pete

    1) You can format the cell as text only
    2) or you can leave the formatting as "Automatic" and precede the contents of the cell with a single quote " ' "

  • My wife's iPad no longer accepts texts/iMessages. Did well for a year, now no go.

    My wife's iPad no longer accepts texts/iMessages. Worked great for over a year, now nada?  Help?

    1. Make sure software is up to date
    2. Make sure Messages is enabled; Settings>Messages
    3. Make sure Date and Time is correctly set; Settings>General>Date and Time>Set Automatically>On
    4. Make sure Push Notification is enabled
    5. Make sure phone number or email address is correct
    6. Hold the Sleep and Home button down (together) until you see the Apple Logo

  • Check if a cell contains specific text

    I am trying to do a check to see if a cell contains specific text (but may also include other text). I thought this might be accomplished with an 'if' statement. Is this possible in Numbers?

    I am assuming the word "carrot" can appear multiple times within the same cell so the COUNTIF function will not work for this case.
    Set up an auxiliary (second) table that is the same size as your "matrix". Each cell in this new table corresponds to a cell in your "matrix". Each of these cells will count how many times "carrot" appears in the corresponding cell of the "matrix". The formula below will count how many times the letters "carrot" appear in that exact order in a cell. In other words, "carrotstick" is also included in the count. Capitalization is not a factor. It assumes your "matrix" top left corner is cell B2 of Table 1.
    Table 2 cell B2=(LEN(UPPER(Table 1 :: B2))-LEN(SUBSTITUTE(UPPER(Table 1 :: B2),UPPER($A$1),"")))/LEN($A$1)
    Copy or fill that formula to the rest of the cells.
    Table 2 cell A1 = carrot (the word you are looking for)
    Somewhere else have a cell that sums the cells in Table 2.
    The formula works by removing all instances of the word "carrot" from the string then subtracting the length of the new string from the length of the original and dividing that by the length of the word "carrot". The result is the number of times "carrot" appears in that particular string.
    You could put a space before and/or after "carrot" in cell A1 to avoid counting words such as "carrotstick" but if "carrot" is the first and/or last word of the string, it will not get counted because that space will not be there in the string.
    Message was edited by: Badunit

  • Checking a number sequence with regular expressions

    Hello,
    Suppose I have a text in the pattern:
    A1=ha,A2=bla,A3=cha,...
    I don't know how many sections of "A#=$" (# denotes number, $ denotes text) will be in the text, but I want to verify that the numbers of the A's form the natural ascending number sequence (i.e 1,2,3,...). I prefer to use regular expressions to do this, but if there's another way, I will be glad to hear it too.
    Therefore my question is: How can I use regular expressions to check for a sequence of numbers? I know I can search for groups I've caught previously in the expression, but how can I compute the next number in the sequence from the group and search for the result?
    Thank you very much!

    What I'd do--and I'm not saying this is optimal, just what pops immediately to mind--is have a regex that matches "A(\\d+)=" (assuming the ha, bla, cha can never be "A1" etc.--if they can, you can still do it, but it's more complicated), then you iterate with the Matcher, and each time, you get the Integer.valueOf what you matched. You keep track of the last value, and compare the current to the last. If current is < last (or <= last, depending on your requirements), fail.
    Something like this. I don't recall Matcher's methods off the top of my head, so you'll have to fix the details.
    Matcher m = Pattern.matcher("A(\\d+)=");
    int maxSoFar = Integer.MIN_VALUE;
    while (m.matches(input)) {
        int current = Integer.parseInt(m.getMatchedField("$1"));
        if (current <= maxSoFar) {
            // fail
        else {
            maxSoFar = current;
    } maxSoFar =

  • Overload resolution failed because no accessible "New" accepts this number of arguments.

    HI
    Just need a little help figuring this error out.  The New Font is giving me trouble.  Overload resolution failed because no accessible "New" accepts this number of arguments. I don't know what I'm doing wrong here.  Any help would
    be greatly appreciated. 
    PrivateSubmnuPrint_Click(sender
    AsObject,
    e AsPaintEventArgs)
    HandlesmnuPrint.Click
    DiminputFile
    AsStreamReader  
    'Object variable
    DimintX
    AsInteger=
    10        'X coordinate for printing
    DimintY
    AsInteger=
    10        'Y coordinate for printing
    Try
    'Open the file
                inputFile =
    File.OpenText("dataFile.txt")
    'Read all the lines in the file
    DoWhileNotinputFile.EndOfStream
    'print a line from the file
                    e.Graphics.DrawString(inputFile.ReadLine(),
    NewFont,
    CSng(("Courier")),
    10, FontStyle.Regular,
    Brushes.Black, intX, intY)
    'Add 12 to intY
                    intY += 1
    Loop
    'Close the file
    Catchex
    AsException
    'Error message for file open error
    MessageBox.Show("Error:
    Could not open file.")
    EndTry
    EndSub
    Thanks in Advance!

    Elise,
    Please modify your post and this time around, instead of showing the code as text, click the button in the header that has a "<>" in it to use the Code Block tool. Select VB from the combo, the paste your code there, then finally post it
    here. It'll be a lot easier to read that way. :)
    Also though, please indicate which line is showing the compile error.
    Do you have Option Strict set to On? You should if not.
    Still lost in code, just at a little higher level.

  • Format Excel cell

    Hi,
    I am writing a program that will send out an email with an excel attachment. When I open the excel file, it does show the leading zeros if the value contents only digits. For example. if the plant is '0005' the file displays just '5'. Do you know how to format the cell to text field?
    I am using FM 'SO_DOCUMENT_SEND_API1' for the email sending.
    Thanks,
    Chuong

    Hi,
    If you are using OLE automation to create the excel, you should format the cell like this:
    SET PROPERTY OF cell 'NumberFormat' = '@'.
    Regards,
    Claudiu

Maybe you are looking for

  • Java.lang.IllegalStateException: Attempt to mutate in notification

    I get this exception sometimes when I change a value in a row of a JTable in a JClient. But I don't understand when the exception is called. Can somebody explain me what this exception means and how to avoid this?? The next lines are from the stack-o

  • Is it possible to add HTML inside of a cfgridcolumn

    Hello All, I have been searching extensively for an answer, but have not yet found it and figured I would post here. Thanks to everyone who takes the time with this :). My question is this: Is it possible to add HTML to a cfgridcolumn? My form looks

  • Photo shop starter  "my catalog"

    I cannot open photo shop it says that it cannot find "my catalog" I have been using for a long time not I cannot access my pictures... How do I fix this? Vicky

  • Impact on physcial machines and network when running Capacity Planner.

    I need to find a white paper or an app note that explains how Capacity Planner collects data from physical machines.  I seem to have been pulled into the middle of a squabble between IT staff members that has the manager halting a virtualization proj

  • Where should I create the DataSource ?

    I have an application which uses the Tomcat Connection Pooling. Its running fine with the following code: DataSource dataSource = (DataSource) envCtx.lookup(contextName); conn = dataSource.getConnection(); My First Question: If it really a connection