+ Reply to Thread
Results 1 to 7 of 7

if cell contains then copy it with 4 more characters

  1. #1
    Registered User
    Join Date
    12-05-2019
    Location
    Bratislava
    MS-Off Ver
    365
    Posts
    3

    if cell contains then copy it with 4 more characters

    Hello all,

    i am not sure if it is possible with functions or i need to use VBA (if VBA please move my topic to correct thread)

    I have table and in one column i have string of information and some of them contains what i need to find

    Few examples:
    1492(IM263685)
    IM264966, testovacia validacia
    1525, SEMCR_IM264966
    Management - incidenty

    What i need is to extract all IM26**** to another column. "IM26" is always same for all, but the next 4 characters are always different.

    Thanks for help

    Kody

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: if cell contains then copy it with 4 more characters

    Do you want all IM26xxxx values returned (including duplicates) or just the distinct values?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,035

    Re: if cell contains then copy it with 4 more characters

    Assume your data in Column A, then in Column B and copy down =MID(A1,FIND("IM26",A1),8)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    12-05-2019
    Location
    Bratislava
    MS-Off Ver
    365
    Posts
    3

    Re: if cell contains then copy it with 4 more characters

    I am not sure if i understand you question correctly

    This is what i need to achieve - From column A extract IM****** to column B

    Untitled.png
    Last edited by Kodyzak; 12-05-2019 at 10:36 AM.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,493

    Re: if cell contains then copy it with 4 more characters

    Alan answer is what you are looking for

  6. #6
    Registered User
    Join Date
    12-05-2019
    Location
    Bratislava
    MS-Off Ver
    365
    Posts
    3

    Re: if cell contains then copy it with 4 more characters

    WOW.. thas was quick.. it works perfectly

    Thank you very much guys

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,552

    Re: if cell contains then copy it with 4 more characters

    You may need ; as the separator - not , - as you are in Slovakia.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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. How copy a specific type of characters from a middle of cell to new cell
    By Nicolass in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-16-2017, 12:15 PM
  2. Copy cell into another if it contains 7 characters
    By jriemanx2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-08-2016, 09:49 AM
  3. [SOLVED] Copy all but the first six characters in a cell
    By debbiesh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2014, 10:49 AM
  4. [SOLVED] copy a row if a cell contains a certain amount of characters
    By batchjb69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2014, 06:39 PM
  5. [SOLVED] copy only alpha characters to new cell
    By shaz0503 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2013, 10:06 PM
  6. [SOLVED] copy characters in cell to other cell less first 3 characters.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2012, 11:46 PM
  7. Replies: 1
    Last Post: 08-07-2006, 11:55 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