Results 1 to 8 of 8

Replace given text and variable number

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Replace given text and variable number

    In certain lines in my document I have the text 'NUMBER: ' followed by a number of variable length.

    I'd like to use Find and Replace code to remove the text 'NUMBER: ' and the following number wherever it appears.

    So , for example the lines

    SEAL - FLY LIKE AN EAGLE
    126730BX320 NUMBER: 9067

    SOUL FOR REAL - EVERY LITTLE THING I DO
    166044BX90 NUMBER: 58453393

    SPACEHOG - IN THE MEANTIME
    159298BX192 NUMBER: 68229

    ASWAD - DON`T TURN AROUND
    27947BX111


    would become

    SEAL - FLY LIKE AN EAGLE
    126730BX320

    SOUL FOR REAL - EVERY LITTLE THING I DO
    166044BX90

    SPACEHOG - IN THE MEANTIME
    159298BX192

    ASWAD - DON`T TURN AROUND
    27947BX111


    Can someone suggest some code to satisfy this?

    I'll attach a sample file.


    Grateful for any advice.

    Attached Files Attached Files
    Last edited by CDandVinyl; 12-26-2023 at 10:07 PM.
    Using Excel , Word and Access 2003 - For the whole of 2024

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find number in parenthesis and replace with text and increasing number
    By lamdathoa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2020, 10:09 AM
  2. [SOLVED] Help to create a formula for replace a variable with a number into a cell
    By imifarma in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-19-2020, 10:07 AM
  3. Replies: 3
    Last Post: 02-17-2015, 11:53 PM
  4. [SOLVED] Replace text number with some other number based on the sheet
    By amandeepsharma89 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2013, 09:52 PM
  5. search within text file and replace strings with variable number of characters
    By ingolf_ingolfsen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 03:54 AM
  6. [SOLVED] search for text or ??? in column A, set variable or replace
    By kldailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2012, 11:56 PM
  7. [SOLVED] Replace variable row number in formulas
    By Ldub in forum Excel General
    Replies: 0
    Last Post: 11-03-2005, 06:30 PM

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