+ Reply to Thread
Results 1 to 6 of 6

Finding the next matching value

  1. #1
    Registered User
    Join Date
    07-28-2014
    Location
    Houston, TX
    MS-Off Ver
    2016
    Posts
    8

    Finding the next matching value

    Hello Everyone,

    I am having trouble finding a formula to get the next matching number. Please see example uploaded. Expected output is on Sheet2. Is there a formula that can make this happen?Example.xlsx

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Finding the next matching value

    You can do it using a Helper Row on Sheet1

    B4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy across.

    Then, on Sheet2, use: Row 4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    committed with Ctrl-Shift-Enter and copied down.

    See the updated example.


    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Finding the next matching value

    Quote Originally Posted by ellie2014 View Post
    Hello Everyone,

    I am having trouble finding a formula to get the next matching number. Please see example uploaded. Expected output is on Sheet2. Is there a formula that can make this happen?Attachment 335961
    Try the formula for cell C4 at Sheet2, likes this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  4. #4
    Registered User
    Join Date
    07-28-2014
    Location
    Houston, TX
    MS-Off Ver
    2016
    Posts
    8

    Re: Finding the next matching value

    Thanks to both of you. They both worked!

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the next matching value

    well if you are using a helper then
    in sheet1!b1
    =RANK(B3,$B$3:$Q$3)+COUNTIF($B$3:B3,B3)-1 filled acros
    then
    sheet2!c4 is
    =INDEX(Sheet1!$B$2:$Q$2,,MATCH(ROWS($1:1),Sheet1!$B$1:$Q$1,0)) filled down
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,753

    Re: Finding the next matching value

    You're welcome. Thanks for the rep.


    I like Martin's solution because, although it uses a Helper row, it doesn't need an Array Formula. And I like Tiger's solution too as it's self contained ... though I would really struggle to work out a formula like that from scratch.

    But hey, three different and working solutions in less than 40 minutes ... can't be bad

+ 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. Finding Matching Data in one Column/Adding corresponding matching string value.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2013, 07:23 PM
  2. Finding the matching value
    By northerng in forum Excel General
    Replies: 1
    Last Post: 05-27-2011, 05:33 AM
  3. Finding matching data
    By solnajeff in forum Excel General
    Replies: 5
    Last Post: 11-30-2007, 11:58 PM
  4. Finding a matching cell
    By gbWildy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2007, 01:44 PM
  5. Finding One Value, Matching Three Criteria
    By cattle mgr in forum Excel General
    Replies: 2
    Last Post: 08-29-2005, 03:32 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