+ Reply to Thread
Results 1 to 19 of 19

How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

  1. #1
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    I want to seperate below mentioned example type numbers to extract from string
    54218/75155/5
    54221/45655/6
    54218/45655/4
    54802/65858/1
    65458/56325/9
    I have above mentioned type numbers which are in beginning or in middle or at end of long text string which also contains blank spaces.
    I need to extract above mentioned type numbers in separate cell and also want in trimmed format, without blank spaces

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    We need more than that. Aare they always 5 digits/5 digits/1 digit?


    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    ... and are you still on Excel 2007? please update your profile with your current version.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    In the absence of a sample sheet, a guess:

    =IFERROR(LOOKUP(1000,SEARCH(L$1:L$5,A2),L$1:L$5),"")
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Yes, It's always 5 digits/5 digits/1 digit.

    And I have Excel 2007.

  6. #6
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Sample Sheet Attached
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    It's working well but in some cases I have two this type of backslash separated numbers, in this case If I want to return first number in one cell and another in second cell, what will be the formula for that

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    please supply a new sample workbook, showing that.

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    And can you make the extra text TRULY representative of the extra text in your real data.

  11. #11
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Sample Sheet
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Firstly, that is not very realistic data.
    Secondly I have no idea how to do what you want in 2007.

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Can you confirm that you are wanting this to work with Excel 2007????

  14. #14
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Yes, I have Office 2007

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    Your sample does not look realistic. You said there was also a lot if text, but there is no text in your sample. So please provide realistic samples.

    Are you OK with VBA solution. I can not help... but others may be able to help.

  16. #16
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    This is actual and realistic example. It is ok if someone provide VBA solution

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    OK. One attempt at a formula based solution that requires helper columns... It uses sequential SUBSTITUTE formulae. It is practical IF the number of possible unique numbers in each string is not too large.

    How many valid results, maximum, are there for an individual, single string. This is set up for 3. Beyond 5 or so it will get awkward.

    Does this help? happy to explain, if needed.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    I need maximum two individual numbers in single string. So it's enough for me

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

    Re: How To Return Value In Another Cell If A Cell Contains Certain Number Sequences

    So - you're happy... yes?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] Extract all sequences from string in a cell
    By Matt7272 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-28-2020, 09:37 AM
  2. Replies: 3
    Last Post: 01-25-2020, 11:51 PM
  3. [SOLVED] Return next cell if left of cell is blank or number
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-04-2019, 07:17 AM
  4. Replies: 9
    Last Post: 11-15-2018, 11:22 AM
  5. Replies: 7
    Last Post: 12-06-2015, 05:40 PM
  6. Find a string withing cell range and return cell number
    By visak in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2015, 09:19 PM
  7. Replies: 2
    Last Post: 10-03-2014, 03:46 AM

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