+ Reply to Thread
Results 1 to 8 of 8

Lookup unknown number in a row based on a range

  1. #1
    Registered User
    Join Date
    04-29-2017
    Location
    melbourne
    MS-Off Ver
    2007
    Posts
    7

    Lookup unknown number in a row based on a range

    Hi All,

    Very new to forums, and hope this is the right area for my query.

    I have a 5 columns containing either numbers or text and I need to lookup a number that appears in each row between a range.

    here is an example:
    Reference Number 2 Reference Type 3 Reference Number 3 Reference Type 4 Reference Number 4 Return value here
    SYDNEY ORDER NUMBER 577552 PRODUCT CODE 80300453
    574597 ORDER NUMBER 80298772 PRODUCT CODE RESEARCH

    I need to return any number in each row between 80000000 and 89999999
    As you can see, the text and numbers dont always appear in the same row

    Thanks in advance

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup unknown number in a row based on a range

    Welcome to Excel Forum
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    04-29-2017
    Location
    melbourne
    MS-Off Ver
    2007
    Posts
    7

    Re: Lookup unknown number in a row based on a range

    Thanks for the quick reply, attached a work book.,

    There are 2 worksheets, 'data' contains raw data, 'desired result' shows what i need to accomplish

    thanks again
    Joe
    Attached Files Attached Files

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup unknown number in a row based on a range

    Try

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


    Drag down!!!

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

    Re: Lookup unknown number in a row based on a range

    Try this in F2:

    =LOOKUP(2,1/(A2:E2>=80000000)/(A2:E2<=89999999),A2:E2)

  6. #6
    Registered User
    Join Date
    04-29-2017
    Location
    melbourne
    MS-Off Ver
    2007
    Posts
    7

    Re: Lookup unknown number in a row based on a range

    this probably seems so basic to you - i was working on this for days and you solved it in like 5 minutes
    thanks VERY much, you are amazing!!!

    kind regards
    Joe

  7. #7
    Registered User
    Join Date
    04-29-2017
    Location
    melbourne
    MS-Off Ver
    2007
    Posts
    7

    Re: Lookup unknown number in a row based on a range

    both =LOOKUP(2,1/(A2:E2>=80000000)/(A2:E2<=89999999),A2:E2)
    & =INDEX(A2:E2,,MATCH(80,INDEX(LEFT(A2:E2,2)+0,),0))
    return what I am looking for - thank you both VERY much!!!

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup unknown number in a row based on a range

    Thanks for feedback and happy to help you

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

+ 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. Delete a range of rows based on a known and unknown text value
    By rjssl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2013, 10:37 AM
  2. [SOLVED] Counting Text in a range over unknown number of sheets
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2012, 12:46 AM
  3. count occurances of range of numbers in unknown number of cells.
    By gammaman in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-12-2012, 06:27 AM
  4. Replies: 3
    Last Post: 02-13-2012, 04:27 PM
  5. Inserting rows based on unknown number of tabs
    By Reg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 01:44 PM
  6. automatically assigning pivot based on unknown range?
    By AmyTaylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2006, 04:04 AM
  7. Sorting based on the first column of a defined name range (Unknown)
    By PCLIVE in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2005, 12:05 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