+ Reply to Thread
Results 1 to 3 of 3

Select LESS THAN Column

Hybrid View

  1. #1
    Registered User
    Join Date
    08-23-2009
    Location
    CA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Select LESS THAN Column

    Hi,

    I am trying to select a reference cell value from a column that is LESS THAN.

    1. My reference cell value is 22.

    2. I look at first row and since 22 < 30, I want to pick values in column 3 (30)

    3. Question, how would I get the output below my reference output 22, like i have below?

    Thanks in advance,
    j


    10	20	30		22
    11	21	31		31
    12	22	32		32
    13	23	33		33
    Last edited by jayman7; 09-06-2009 at 12:40 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Select LESS THAN Column

    An example file would probably help in this instance... however if for the sake of demo we assume your sample data table is in A1:C4 and criteria is in D1 with values to be returned in D2:D4 then

    D2: =INDEX($A2:$C2,1+COUNTIF($A$1:$C$1,"<"&$D$1))
    copied down
    Though as you can see from the above you're constantly recalculating the COUNTIF element in which the result is constant... it would therefore make more sense then to store that calculation in E1 and then refer to just that cell from then on, eg:

    E1: =1+COUNTIF($A$1:$C$1,"<"&$D$1)
    
    D2: =INDEX($A2:$C2,$E$1)
    copied down

  3. #3
    Registered User
    Join Date
    08-23-2009
    Location
    CA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Select LESS THAN Column

    Master Don,
    This is exactly what I was looking for, nice and simple. Forgot about the countif function.

    Many thanks,
    j

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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