+ Reply to Thread
Results 1 to 12 of 12

Search Value in between

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Search Value in between

    Dear sir,

    I want to find the value between the numbers using the vlookup formula. But the formula is doing something wrong. You see Sheet2 in column "B" the serial number 70 they it did not come. Do not know what is wrong, if you can, give a new formula.

    Thank you.

    Sorry for my bad english
    Attached Files Attached Files

  2. #2
    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
    30,881

    Re: Search Value in between

    The data has to be ascending order: your is not.

    Value for 70 is less than value for 69 so will match on 100615.7076 (69) as this the nearest (lower) value to the search value.

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Search Value in between

    The data in column C MUST to be SORTED for inexact match to work correctly

    That could not be done because of your merged cells
    So I removed columns A & B to get the formula to work

    Rebuild your sheet without merged cells, sort your data, and all should be good
    Attached Files Attached Files
    Last edited by kev_; 01-26-2018 at 10:15 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  4. #4
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: Search Value in between

    hello sir,
    Yes is correct but I can not sort the list, it should be in the same place. Is there any other formula or way?

  5. #5
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: Search Value in between

    hello sir,
    Yes is correct but I can not sort the list, it should be in the same place. Is there any other formula or way?

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Search Value in between

    Here is a way to get your result without sorting your data.

    B2 of Sheet2 =SUMIFS(Sheet1!E:E,Sheet1!C:C,"<="&A2,Sheet1!D:D,">="&A2)

  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,662

    Re: Search Value in between

    Try this formula:

    =INDEX(Sheet1!$E$2:$E$95,MATCH(1,INDEX((Sheet2!A66> =Sheet1!$C$2:$C$95)*(Sheet2!A66< Sheet1!$D$2:$D$95),0),0))

    as far as I can see it is giving the correct answers in rows 52-75....
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 01-26-2018 at 11:02 AM.
    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

  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Search Value in between

    Use 2 linked lists on 2 different sheets
    - leave List1 in the original order
    AND
    - sort List2
    - base formula on List2

  9. #9
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: Search Value in between

    63falcondude,
    and also thank you very much for giving formula.

  10. #10
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: Search Value in between

    Glenn Kennedy,
    Thank you very much, this is working very well.

  11. #11
    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,662

    Re: Search Value in between

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  12. #12
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Search Value in between

    You're welcome. Thanks for the rep!

+ 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] Code to search Excel and return results even if part of search text is present
    By Taoyuan00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2016, 09:20 AM
  2. Replies: 4
    Last Post: 12-02-2014, 05:17 PM
  3. Replies: 4
    Last Post: 11-08-2014, 04:57 AM
  4. Replies: 4
    Last Post: 05-20-2014, 10:03 AM
  5. VBA Code - Search text & search number & search qty and result - Urgent Please
    By naresh73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 10:51 AM
  6. Truncate text strings using LEFT and FIND/SEARCH for multiple search terms
    By ngdoherty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2013, 07:51 PM
  7. Replies: 1
    Last Post: 10-18-2012, 05:52 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