+ Reply to Thread
Results 1 to 13 of 13

Extract not used numbers !

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Extract not used numbers !

    Hi,

    A1=123456789.

    If B1=59173 I need at C1=2468

    If B1=9256 and B2=1932 I need at C2=478

    Thank all

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Extract not used numbers !

    Hi,

    This is provably a much simplified example and may not represent the size of your actual data.
    We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    For instance are the values always numeric or may some be strings, how long are the numerics/strings, are there alphanumeric cells, is there ever stuff at B1, B2 & B3 which needs eliminating from C3...etc
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract not used numbers !

    A1, B1, B2 are numerical.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Extract not used numbers !

    ...and is there ever a B3 and is there a limit to the number of digits

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,797

    Re: Extract not used numbers !

    And is the digit zero not counted as a number ?

    Pete

  6. #6
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract not used numbers !

    Yes, zero do not exist, only 1 to 9
    Numbers in B1 and B2 , exists in A1

  7. #7
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Extract not used numbers !

    Lot's of what-if's per Richard and Pete's concerns but here's an attempt that at least matches the provided example.

    ionelz.png

    I need a couple of helper ranges.
    In D1:K1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In D2:K2 almost the same formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In C1 copied down to C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    textjoin() would have been nice here, unfortunately I have an old version of Excel.
    Attached Files Attached Files
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  8. #8
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract not used numbers !

    Thank you very much...

  9. #9
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Extract not used numbers !

    A fun little problem - I'm sure there's more efficient solutions out there! - thanks for the rep!

  10. #10
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,923

    Re: Extract not used numbers !

    Or try:

    =SUBSTITUTE(SUMPRODUCT({1;2;3;4;5;6;7;8;9}*10^{9;8;7;6;5;4;3;2;1}*ISERROR(SEARCH({1;2;3;4;5;6;7;8;9},$B$1&$B$2))),0,"")

  11. #11
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract not used numbers !

    Last one is a cool formula too !
    I want to ask if $B$1 or $B$2 can be replaced by a Range

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,923

    Re: Extract not used numbers !

    The Search function only works with one string.

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

    Re: Extract not used numbers !

    Please try at C1

    =NPV(-0.9,IF(ISERR(FIND(MID(A1,10-ROW(A$1:A$9),1),B1)),MID(A1,10-ROW(A$1:A$9),1)/10))

    Ctrl+Shift+Enter

+ 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. Extract all numbers from string, returning numbers to individual cells
    By LJBOS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2020, 08:46 AM
  2. [SOLVED] Extract the text and numbers basis on specific numbers included
    By Neilesh Kumar in forum Excel General
    Replies: 6
    Last Post: 08-26-2018, 01:34 PM
  3. [SOLVED] How to Display Numbers Only OR How To Extract Numbers In A Cell
    By PaddyP in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-17-2016, 12:32 PM
  4. Replies: 2
    Last Post: 05-02-2006, 11:20 AM
  5. Extract numbers from cell with Text and Numbers
    By wiredwrx in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-18-2006, 06:00 PM
  6. [SOLVED] extract numbers from cell containing text & numbers
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2005, 03:10 AM
  7. [SOLVED] Extract Fractional Numbers as Numbers NOT Date
    By MrBill in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-02-2005, 06:17 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