+ Reply to Thread
Results 1 to 5 of 5

How to replace alphabet by a number using VBA?

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    USA
    MS-Off Ver
    Office365
    Posts
    32

    How to replace alphabet by a number using VBA?

    Hi folks,
    I am new to vba. I want to substitute all "a"s in the worksheet by number 1 wherever a cell contains "a" in the spreadsheet. Note that these "a"s are actually generated by vba code from another worksheet. your help in this will be very much appreciated. Please see the attached test.xlsm file.

    Those "a" s are actually somehow exported from "sheet2" to "sheet1" using vba.

    Many thanks
    Prad
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to replace alphabet by a number using VBA?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    USA
    MS-Off Ver
    Office365
    Posts
    32

    Re: How to replace alphabet by a number using VBA?

    Hi AB thanks for the response and it really seems working; however, I only want to find single "a" in the whole sheet and replace those by numeric 1 ...would it be possible? with your formula it changes all "a"s wherever it finds including from words ..

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,534

    Re: How to replace alphabet by a number using VBA?

    Quote Originally Posted by meprad View Post
    I only want to find single "a" in the whole sheet and replace those by numeric 1
    try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    USA
    MS-Off Ver
    Office365
    Posts
    32

    Re: How to replace alphabet by a number using VBA?

    Thanks a lot Jindon...it works perfect !!

+ 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. How to display only certain Number and Alphabet
    By kaneda82 in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 09-09-2012, 08:51 PM
  2. Alphabet/number reference
    By Pasha81 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2009, 01:54 PM
  3. Returning Alphabet Instead of Number
    By shrooms in forum Excel General
    Replies: 10
    Last Post: 01-10-2009, 11:12 AM
  4. Replies: 3
    Last Post: 10-19-2005, 01:10 PM
  5. Replies: 3
    Last Post: 09-13-2005, 01:05 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