+ Reply to Thread
Results 1 to 5 of 5

Locate the seocnd furthers left value in a horizontal range

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    England
    MS-Off Ver
    2003
    Posts
    4

    Locate the seocnd furthers left value in a horizontal range

    Hi,

    I posted a thread before here

    http://www.excelforum.com/excel-form...tal-range.html

    Building on this question, I would be grateful for guidance on selecting the second furthest left of a certain value which appears multiple times in a horizontal range and then pulling through the value immediately to its left. For instance I would be looking to pull through 56, 3 and 34 from 3 rows working down where B is the value concerned.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Locate the seocnd furthers left value in a horizontal range

    You can use this "array formula" in M6

    =INDEX(A6:K6,SMALL(IF(B6:L6="B",COLUMN(B6:L6)-MIN(COLUMN(B6:L6))+1),2))

    confirmed with CTRL+SHIFT+ENTER and copied down

    The 2 at the end of the formula gives you the 2nd value from the left, if you change to 3, for example, you will get the 3rd match from the left. If there isn't an nth match then you'll get an error, use IFERROR function around the above formula to return another value if you require
    Audere est facere

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Locate the seocnd furthers left value in a horizontal range

    Try this array formula**:

    =INDEX(A6:K6,LARGE(IF(B6:L6="B",COLUMN(B6:L6)-COLUMN(B6)+1),2))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    11-14-2014
    Location
    England
    MS-Off Ver
    2003
    Posts
    4

    Re: Locate the seocnd furthers left value in a horizontal range

    Cheers guys, they work a treat and the fast responses are appreciated.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Locate the seocnd furthers left value in a horizontal range

    I misunderstood what you wanted but the formula works due to dumb luck!

    I thought you wanted the 2nd instance from right to left. In the sample file there were always 3 instances of the lookup value so looking from left to right or right to left would always give the same correct results.

+ 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] Locate the furthest left of a value in a horizontal range
    By Mitch Connor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2014, 12:07 PM
  2. Copy Values to separate sheet, locate value in list and paste 6 cells to the left
    By drknot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2014, 10:16 AM
  3. Replies: 6
    Last Post: 01-02-2012, 07:44 PM
  4. Replies: 2
    Last Post: 04-16-2011, 07:48 AM
  5. [SOLVED] How do I locate the horizontal scroll bar excel 2000?
    By Sharon in forum Excel General
    Replies: 5
    Last Post: 01-01-2005, 10:06 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