+ Reply to Thread
Results 1 to 8 of 8

How to censor account numbers based on how many characters are in the account number

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to censor account numbers based on how many characters are in the account number

    Hello Excel Guru's

    My job is to email out funding notifications to our clients who do not like their banking account information out in the open. So for example if someone's account number is 4587631234 we would instead write ******1234. What I am looking for is a formula that will censor every digit except for the last 4 when the account number has 7 or more all but the last three when there are 6 characters and all but the last two when there are 5 or less characters (****1234,
    ***9567,***567,***88 for example). I have attached a dummy excel file to test anyone’s ideas for what type of formula to use. Thanks in advance to any and all help


    CENSOR PROBLEM.xlsx
    Last edited by Mcorydon; 04-25-2013 at 12:30 PM.

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: How to censor account numbers based on how many characters are in the account number

    In an effort to keep the formula from having multiple If statements, I would suggest the solution in the attached file.
    You can simply change the values in H3:I5 if something changes.
    Attached Files Attached Files
    Please click the * icon below if I have helped.

  3. #3
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: How to censor account numbers based on how many characters are in the account number

    I knew there was a clean way without the table. Here is an alternative, stand-alone formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: How to censor account numbers based on how many characters are in the account number

    How about:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Registered User
    Join Date
    08-20-2012
    Location
    High Wycombe, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: How to censor account numbers based on how many characters are in the account number

    Hi Mcorydon,

    Try this formula

    =IF(A1>1000000,(CONCATENATE("****",RIGHT(A1,4))),(IF(A1>100000,(CONCATENATE("***",RIGHT(A1,3))),(IF(A1>10000,(CONCATENATE("***",RIGHT(A1,2))),"")))))

    So if it is a 7 digit number (ie above 1,000,000) then it will put **** + the 4 digits from the right of it, if not it will see if its a 6 digit number and if not a 5 digit, if its not then it will put blank.

    Hope this helps

  6. #6
    Registered User
    Join Date
    04-25-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to censor account numbers based on how many characters are in the account number

    You are an unbelivable help, also do you know of a way to make an excel dropbox act like google would so that i could type part of a client and thats what would show up? does that make sense?

  7. #7
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: How to censor account numbers based on how many characters are in the account number

    The feature is called "Auto-Complete", and I'm fairly certain there is no way to have it work the way you described in excel.
    The only time it works is in a continuous column of data (if you type September in B2, and go to type September again in B3 it will Auto-Complete).

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to censor account numbers based on how many characters are in the account number

    Hi Mcorydon

    Another version!
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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