+ Reply to Thread
Results 1 to 3 of 3

Text Cleaning

  1. #1
    Registered User
    Join Date
    07-28-2020
    Location
    Melbourne,Australia
    MS-Off Ver
    365
    Posts
    20

    Text Cleaning

    I have an e-mail data. I need to fetch the name of the clients. For example in second row I want "abdulla". Attach excel sheet. Most of it start from dear but some are also starting from hi or some are starting from just name. any suggestions how i can get the name for these clients. if i am able to bring 80% of client name from the column I am happy.

    Please help me.
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Text Cleaning

    look for a pattern. also, see here for regEx:

    https://www.automateexcel.com/vba/regex/

    https://stackoverflow.com/questions/...cell-and-loops

    if that is too complex, you can always use string functions in VBA if there is any pattern whatsoever to data in each row. for instance, in row 1 you can do this:
    Please Login or Register  to view this content.
    that will find what you want in row 2:
    Please Login or Register  to view this content.
    if you want to do it without code and by formulas, you'll have to use find() and mid(), instead of mid and instr

    https://docs.microsoft.com/en-us/off...p/mid-function

    https://docs.microsoft.com/en-us/off...instr-function

    https://support.microsoft.com/en-us/...3-d0d89b0a0628

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Text Cleaning

    Please try

    =TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LOOKUP("Ω",MID(A2,FIND({"Hi","Dear"},A2)+LEN({"Hi","Dear"})+1,20)),"_",","),". H",","),"..",","),",",REPT(" ",20)),20))
    Attached Files Attached Files

+ 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. [SOLVED] Requesting assistance in cleaning up some text import VBA
    By #DIV/0! in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-18-2017, 04:11 AM
  2. [SOLVED] Text cleaning Macro
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2015, 01:17 AM
  3. Need help cleaning up pasted text and comparing two lists.
    By fredriko83 in forum Excel General
    Replies: 14
    Last Post: 02-16-2015, 02:04 PM
  4. [SOLVED] text from mail copy paste , cleaning
    By makinmomb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2014, 11:48 PM
  5. text to col = cleaning data
    By Blake 7 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-12-2013, 10:07 AM
  6. Cleaning up a text file
    By WarrenC in forum Excel General
    Replies: 3
    Last Post: 12-05-2007, 03:50 AM
  7. Cleaning text boxes
    By jasonsweeney in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2005, 01:05 AM

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