+ Reply to Thread
Results 1 to 7 of 7

Need help adding 00 and inserting it in hundreds of rows

  1. #1
    Registered User
    Join Date
    01-26-2009
    Location
    seattle, washington
    MS-Off Ver
    Mac Excel 2011
    Posts
    19

    Need help adding 00 and inserting it in hundreds of rows

    I am trying to clean up data for a chatbot we are programming for school and I need to move the #'s from column c and insert them into column d so they would look like this.

    Current
    botPref = ("genus")

    Desired
    botPref004 = ("genus")

    Is there a couple of steps or will this be "oh hey you could try this"

    Thanks in advance for your help.

    Screen Shot 2016-05-24 at 2.57.49 AM.png

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Need help adding 00 and inserting it in hundreds of rows

    Try this ...

    =SUBSTITUTE(D2,"botPref","botPref"&TEXT(C2,"000"))
    Last edited by Phuocam; 05-24-2016 at 07:11 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Need help adding 00 and inserting it in hundreds of rows

    Hi excelstone,

    Try this in cell E5.

    =IF(C6<10,"botPref"&"00"&C6&" "&MID(D6,9,100),"botPref"&"0"&C6&" "&MID(D6,9,100))

    NB - It will only work up to 99 lines of data. How many are you working with?

    Snook

  4. #4
    Registered User
    Join Date
    01-26-2009
    Location
    seattle, washington
    MS-Off Ver
    Mac Excel 2011
    Posts
    19

    Re: Need help adding 00 and inserting it in hundreds of rows

    Snook, now that the cells are uniform I need to take a "cold snapshot" of the columns.

    For example if I copy E column and paste it the calculation disappears... there is a copy or paste feature like that.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Need help adding 00 and inserting it in hundreds of rows

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Need help adding 00 and inserting it in hundreds of rows

    Are you saying you want to copy the values the formula created ?
    If so then select pasteSpecial and click "values"

  7. #7
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Need help adding 00 and inserting it in hundreds of rows

    Hi excelstone,

    Like nimrod says it sounds like you need to copy and paste value your formulas to hard code them, i.e. convert them from formulas into actual text. To do this select the range to be converted (presumably from E2 down to the bottom of the range), copy them (ctrl + c) and then paste them on top of itself as a value (ctrl + alt + v to display the paste special dialog box then select 'values' and press ok).

    Regards,

    Snook

+ 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. Replies: 2
    Last Post: 08-12-2014, 12:23 PM
  2. Macro For Inserting Rows, After Every Nth Row and adding text to the inserted row
    By xxBEANCOUNTERxx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2014, 07:47 PM
  3. how to apply a formula to hundreds of rows
    By Malkey in forum Excel General
    Replies: 11
    Last Post: 06-10-2012, 10:35 AM
  4. [SOLVED] Remove hundreds of empty rows
    By drews in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-22-2011, 04:29 PM
  5. inserting a row and adding the new rows?
    By mkabs11 in forum Excel General
    Replies: 6
    Last Post: 03-17-2011, 04:54 PM
  6. Hide Hundreds of Rows
    By mavsman4457 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-14-2008, 12:53 AM
  7. How can I remove multiple (hundreds) of blank rows in one step?
    By Lisa J. Stamper in forum Excel General
    Replies: 2
    Last Post: 04-26-2006, 08:35 PM

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