+ Reply to Thread
Results 1 to 2 of 2

Insert prefix based on cell value.

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    79

    Insert prefix based on cell value.

    Hi all,

    I have lists of numbers in column A. Based on the number in the cell, I would like to insert RO_ or RP_ before the number. I currently have two buttons for this, one named RO and the other RP and have simply recorded a macro of what I wish to do. However, instead of inserting RO_ or RP_ before the number the macro replaces the hole lot with "RP_10" or "RO_10" as this was the cell i recorded the macro on. How do I make it so it just inserts the Prefix rather than replace the contents of the cell.

    Currently my code for one of the buttons is as follows;

    Please Login or Register  to view this content.
    Yes i am an absolute amatuer when it comes to Macros. Infact this is my first ever.

    Thankyou in advance.

    Regards,

    Spicey_888

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Insert prefix based on cell value.

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

+ 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] Event Macro to insert text in cell based on input of another cell
    By nplouffe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2012, 11:54 AM
  2. After insert new record, insert values in row based on first cell in row
    By frankienap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2012, 11:36 AM
  3. Excel 2007 : insert year prefix
    By nlm in forum Excel General
    Replies: 8
    Last Post: 06-27-2011, 02:57 AM
  4. Vlookup based on Prefix
    By yawnzzzz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2009, 05:46 PM
  5. Using array to sum by multiple criteria including one based on prefix
    By monkdelafunk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2008, 02:24 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