Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9269955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:15:06+00:00 2026-06-18T15:15:06+00:00

I am not good at advanced Excel formula and need help with data cleanup

  • 0

I am not good at advanced Excel formula and need help with data cleanup in excel for migration purpose. This is my scenario:

Column A                                             Column B 

DocName                                              EmployeeName 
ACCT6789_John_Smith_ACCOUNT_DOC_25_JAN_2007          John_Smith
ACCT1122_Jane_Doe_ACCOUNT_DOC_EID00022_21_DEC_2009   Jane_Doe
ACCT1462_Phil_Morris_ACCOUNT_DOC_EID0252             Phil_Moris

I need ColumnA’s string to find exact match against ColumnB. If matched, then delete that matched string from ColumnA. If no exact match, there will be no action and the script will continue checking the next row. I know there will be issue with double underscore, and I hope to only have one underscore between any 2 words.

The desired results for example above will be:

ACCT6789_ACCOUNT_DOC_25_JAN_2007              John_Smith 
ACCT1122_ACCOUNT_DOC_EID00022_21_DEC_2009     Jane_Doe
ACCT1462_Phil_Morris_ACCOUNT_DOC_EID0252      Phil_Moris
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:15:08+00:00Added an answer on June 18, 2026 at 3:15 pm

    Using just formulas in the spreadsheet, you can do the following:

    Assume that column C is available (if not, find an empty column). Type this formula in row 1 (if you have headers in row 1, type it in the first available row and adjust the 1 to the row number):

    =FIND(B1, A1)
    

    This will find an occurrence of B1 (“John Doe”) in A1 ("ACCT6789_John_Smith_ACCOUNT_DOC_25_JAN_2007")

    In the next column over, you type

    =LEFT(A1, C1-1) & RIGHT(A1, LEN(a1) - C1 - LEN(B1))
    

    This takes “the bit of A1 before the string we found” plus “the bit after the thing we found”.

    Now copy this formula all the way down (select both C1 and D1, then double clicking the little box in the bottom right hand corner is a shortcut to dragging all the way down…). Column D now has the results you want.

    Finally, to copy them back to column A, select all of column D, hit copy, then do a Paste-Special-Values into column A. Finally, delete Columns C and D.

    By the way – this method assumes there are underscores on either side of the name you found, and will actually remove the trailing one. If you can’t be sure of that, you should change the formula in Column D to

    =LEFT(A1, C1-1) & RIGHT(A1, LEN(a1) - C1 - LEN(B1) + 1)
    

    And then do another round to remove double underscores and replace them with single… It sounds to me like you don’t need that, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not good at t-sql, so I need help. I have this code I
Im not good at math, I could find everything so far, but not this
I'm not good at OOP design, but I need to demonstrate my knowledge to
I'm not good in communicating between controllers, so i need to setup and check
I'm not good with excel, my knowledge is very limited, but I'm stuck with
Not sure how noob or advanced this question is, but I've been having kind
I'd like to firstly point that I'm not very good at advanced MySQL just
I'm not good in English. What wrong with my text ^^ sorry :) I
Maybe the question sound not good or too simple. But not for me in
It seems not good for me, reporting errors like 'General Error: '+...., Is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.