+ Reply to Thread
Results 1 to 6 of 6

How can I remove a particular digit or digits from a three digit number...help

  1. #1
    Forum Contributor
    Join Date
    11-13-2010
    Location
    Warren, Michigan
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    307

    How can I remove a particular digit or digits from a three digit number...help

    The constant is the numbers or number I want to remove are: 0, 2, 5, 6, 7, 9

    Example:

    A1 the number is 672, so the number left in B1 would be 2.

    Or the number in A2 is 938, the numbers left in B2 would be 38.

    So on and so forth...

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: How can I remove a particular digit or digits from a three digit number...help

    =if(sumproduct(isnumber(search({0,2,5,6,7,9},a1))*1)=len(a1),right(a1,1),substitute(substitute(substitute(substitute(substitute(substitute(a1,0,""),2,""),5,""),6,""),7,""),9,""))
    try this
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: How can I remove a particular digit or digits from a three digit number...help

    Usually you can nest Substitute functions, but I prefer UDF since it is more flexible.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: How can I remove a particular digit or digits from a three digit number...help

    Or below
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-13-2010
    Location
    Warren, Michigan
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    307

    Re: How can I remove a particular digit or digits from a three digit number...help

    Thanks for the quick response...it works!

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: How can I remove a particular digit or digits from a three digit number...help

    You are welcome and thanks for your feedback.

+ 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: 5
    Last Post: 04-22-2013, 02:28 PM
  2. How to add 2 digits to the end of a four digit number
    By Gordond54 in forum Excel General
    Replies: 6
    Last Post: 01-01-2013, 04:19 PM
  3. Fining the first 2 digits of a 6 digit number
    By adam8090 in forum Excel General
    Replies: 10
    Last Post: 05-18-2011, 10:41 AM
  4. Adding first and last digits of a four digit number in vba
    By CollegeKidd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-13-2011, 06:58 PM
  5. Replies: 4
    Last Post: 03-07-2008, 05:21 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