+ Reply to Thread
Results 1 to 5 of 5

Search range for the first 7 numbers of a string.

  1. #1
    Registered User
    Join Date
    08-08-2019
    Location
    Paris
    MS-Off Ver
    Excel 2016
    Posts
    4

    Search range for the first 7 numbers of a string.

    Column A1:A10 = trade references such as 1234567-10 or 7654321-5 or 1234123/5 , etc etc.

    I want to find out whether the trade references (but only the 7 first numbers from left) are in another range on another sheet.

    I've tried ISNUMBER + MATCH + LEFT, but I'm having trouble incorporating the limit of first 7 numbers into the function.


    Any help is greatly appreciated!

    -Cod

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Search range for the first 7 numbers of a string.

    Re: Search range for the first 7 numbers of a string.

    Hello codtrawler87. Welcome to the forum.

    Try array entering something like this.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.


    =ISNUMBER(FIND("1234567",LEFT(a1:a10,7)))
    Dave

  3. #3
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Search range for the first 7 numbers of a string.

    You need to show some examples of what the data looks like on the search sheet. eg,
    this
    HTML Code: 
    or this
    HTML Code: 
    Last edited by JLGWhiz; 08-08-2019 at 03:47 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  4. #4
    Registered User
    Join Date
    08-08-2019
    Location
    Paris
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Search range for the first 7 numbers of a string.

    Thanks, I'll try that tomorrow. I have just one concern: if I insert the "1234567" into the formula, won't it just look for 1234567 when I drag it down from A1:A10?
    For clarification: I have different trade references in each of the cells in A1:A10 and I want to find out if they are in the other range in sheet2.

  5. #5
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: Search range for the first 7 numbers of a string.

    Assuming you try to know if the first 7 characters in A1:A10 included in column E (at same worksheet)


    Please Login or Register  to view this content.

+ 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] Formula to search a range for a string and then extract certain dta from string
    By gratedane8 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2018, 06:09 PM
  2. [SOLVED] Search for a string, grab the numbers from adjoining column
    By noobis in forum Excel - New Users/Basics
    Replies: 15
    Last Post: 03-28-2016, 04:21 PM
  3. Replies: 8
    Last Post: 02-17-2016, 01:19 PM
  4. Replies: 7
    Last Post: 03-30-2015, 11:34 AM
  5. Search for a string of numbers within an array
    By Chubster in forum Excel General
    Replies: 2
    Last Post: 09-06-2014, 09:22 PM
  6. VLOOKUP Search String Against List of Numbers
    By 8bithack in forum Excel General
    Replies: 11
    Last Post: 09-02-2014, 05:35 PM
  7. Search for a string different sequences same numbers in array
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2012, 10:18 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