+ Reply to Thread
Results 1 to 6 of 6

Replace the following values by VBA

  1. #1
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Replace the following values by VBA

    Hello everyone,
    I would like to replace the following values by VBA:
    (a) by (1)
    (b) by (2)
    (c) by (3)
    etc.

    I would like to enter the maximum number of replacements using the input box window.
    FOR EXAMPLE
    23
    Then the last replacement would be
    (W) by (23)

    The whole vba should only apply to the currently active sheet.

    Thanks for your help

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Replace the following values by VBA

    And drumroll........Sample file with expected outcome....

    Try this...
    Please Login or Register  to view this content.
    Last edited by sintek; 11-08-2020 at 07:39 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Replace the following values by VBA

    My sincere apologies.
    The letters to be replaced by numbers are behind a word or behind numbers or in the middle:

    FOR EXAMPLE:
    ProTech - digital future (a)

    or
    ProTech - (a) digital future

    or
    (a) ProTech - digital future

    or

    1234 (a) zun769o

    I am so sorry that I forgot to mention this.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Replace the following values by VBA

    And drumroll........Sample file with expected outcome....

    If
    (a) be replaced with (1)
    (b) be replaced with (2)
    then
    Just change this snippet
    Please Login or Register  to view this content.
    Last edited by sintek; 11-08-2020 at 08:07 AM.

  5. #5
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Replace the following values by VBA

    Thanks a great lot.
    It workes perfectly.

    I apologize again for the extra work

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Replace the following values by VBA

    ..........................
    THANKS.gif

+ 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: 1
    Last Post: 02-27-2018, 11:22 AM
  2. Replies: 7
    Last Post: 10-21-2016, 06:16 PM
  3. [SOLVED] VBA Code replace old values to new values depends upon column values
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2015, 08:19 AM
  4. [SOLVED] vba to Replace Old values by new values depends upon cell values in AC:AC col
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2014, 08:15 AM
  5. Macro to identify column by header and replace number values with string values
    By kang6789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:44 PM
  6. Macro to find all specific values in column and replace adjacent cell values
    By dblock02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2013, 06:03 AM
  7. "Find and Replace" missing the ability to replace values?
    By dylanemcgregor in forum Excel General
    Replies: 6
    Last Post: 06-05-2013, 01:13 AM

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