+ Reply to Thread
Results 1 to 11 of 11

Find the first and last value for the given input.

  1. #1
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Find the first and last value for the given input.

    Hello Friends

    Please find the attached file.

    I need to find the first and last value for the given input (D2:D3) in light yellow cells (E2:F3).

    thanks in advance
    Attached Files Attached Files
    Sekar

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Find the first and last value for the given input.

    For the 1st value, try this, copied down...
    =VLOOKUP(D2,$A$1:$B$26,2,0)
    Will the list always be sorted like that?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Find the first and last value for the given input.

    Slight modification.

    1st entry...
    =INDEX($B$1:$B$26,MATCH($D2,$A$1:$A$26,0))
    2nd entry, assuming they are sorted...
    =INDEX($B$1:$B$26,MATCH($D2,$A$1:$A$26,0)+COUNTIF($A$1:$A$26,D2)-1)
    both copied down as needed

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

    Re: Find the first and last value for the given input.

    Another way.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

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

    Re: Find the first and last value for the given input.

    Or try this ...
    2nd entry
    =LOOKUP(2,1/($A$1:$A$26=$D2),$B$1:$B$26)

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

    Re: Find the first and last value for the given input.

    Or this array-entered in E2 filled down and across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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.

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find the first and last value for the given input.

    Or this
    Enter in E2, copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Find the first and last value for the given input.

    Wow!@! Nice one, AlKey!!! What a lesson. That's beautiful. Couldn't quite figure out where you were going with this one at first. LOL

    I guess I need to start playing with AGGREGATE more.

  9. #9
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Find the first and last value for the given input.

    Hello Ford, Hello Dave, Hello Phuocam, Hello Alkey

    Thanks for all of you. All of your formulas working well.

    thanks again

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Find the first and last value for the given input.

    Happy to help

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

    Re: Find the first and last value for the given input.

    You're welcome. Thanks for the feedback.

+ 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] Need help doing a find input box
    By haone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2016, 01:20 AM
  2. Replies: 56
    Last Post: 09-08-2014, 06:54 AM
  3. [SOLVED] Find input box value
    By Aaron092 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-05-2014, 10:48 AM
  4. find and input with to criteria
    By gjergji in forum Excel General
    Replies: 1
    Last Post: 01-11-2013, 08:42 PM
  5. [SOLVED] Find and Input with criteria
    By gjergji in forum Excel General
    Replies: 9
    Last Post: 09-20-2012, 08:19 PM
  6. find and input data
    By mickeynmh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2008, 10:52 AM
  7. [SOLVED] find user input
    By BorisS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2006, 01:35 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