+ Reply to Thread
Results 1 to 10 of 10

Finding and removing specific characters

Hybrid View

  1. #1
    Registered User
    Join Date
    12-04-2018
    Location
    Derby, UK
    MS-Off Ver
    2016
    Posts
    26

    Finding and removing specific characters

    Hi all,

    Still chipping away at reconciling two sets of data. This time I know that there are matches between data but one set of data has a prefix of 'I-' and the other doesn't so MATCH can't find. I've attached a small example. In sheet one are 15 invoices and in sheet two are the exact same invoices but this time prefixed with 'I-' and contains information about cost. I want sheet one show me the cost of the corresponding invoice on sheet two. I'm happy with the function in column B of sheet one.

    Do I need to use a function in Column A of sheet 2? I'm thinking there might be something I could use where the logic is 'if 'I-' appears in column A then remove it or substitute it for ""'

    The thing to note here is that my two sets of data won't contain only this kind of invoice with an I- prefix as other suppliers invoices appear on the system and so using something like the LEFT function won't work.

    Thank you!
    Attached Files Attached Files

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

    Re: Finding and removing specific characters

    Please try at Sheet1 B2

    =INDEX(Table2[Cost],MATCH([@Column1],INDEX(--RIGHT(Table2[Column1],7),),0))

  3. #3
    Registered User
    Join Date
    12-04-2018
    Location
    Derby, UK
    MS-Off Ver
    2016
    Posts
    26

    Re: Finding and removing specific characters

    Thanks Bo_Ry

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Finding and removing specific characters

    Try this in B2:

    =INDEX(Table2[Cost],MATCH("*"&A2,Table2[Column1],0))

  5. #5
    Registered User
    Join Date
    12-04-2018
    Location
    Derby, UK
    MS-Off Ver
    2016
    Posts
    26

    Re: Finding and removing specific characters

    Thanks 63falcondude

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Finding and removing specific characters

    Or to be more specific...

    =INDEX(Table2[Cost],MATCH([@Column1]&"",INDEX(SUBSTITUTE(Table2[Column1],"I-",""),),0))
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    Registered User
    Join Date
    12-04-2018
    Location
    Derby, UK
    MS-Off Ver
    2016
    Posts
    26

    Re: Finding and removing specific characters

    Yes, Forum Guru this is it. It resolves the issue even with invoices with different structures. Thank you! SOLVED
    Attached Files Attached Files

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

    Re: Finding and removing specific characters

    or can try
    =VLOOKUP("I-"&Table1[[#This Row],[Column1]],Table2,2,0)
    Samba

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

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,209

    Re: Finding and removing specific characters

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Finding and removing specific characters

    You're welcome! Glad it worked as desired.
    Thanks for the 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. Removing Everything before Specific String of Characters
    By mcgonma in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-08-2018, 11:47 AM
  2. Removing characters IF a specific character exists
    By StKi1da in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2017, 11:20 AM
  3. [SOLVED] A macro for removing characters after a specific number of character
    By ugalskov in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-19-2016, 10:19 AM
  4. [SOLVED] removing specific beginning characters within all cells
    By tdf2437 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2014, 02:45 PM
  5. [SOLVED] Removing Specific Characters using IF(ISNUMBER(SERACH....
    By rpc06 in forum Excel General
    Replies: 7
    Last Post: 09-17-2014, 08:59 AM
  6. Removing user-specific characters from data
    By Bonnister in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2012, 12:05 PM
  7. Finding cells with a specific number of characters
    By Kamran in forum Excel General
    Replies: 6
    Last Post: 03-29-2006, 06:10 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