Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Let A2:B7 house the sample you provided with labels in A2:B2...
{"Item","Flag"; "Apple",TRUE; "Banana",TRUE; "Lemon",TRUE; "Orange",FALSE; "Grapefruit",TRUE} which says: A2 = Item, B2 = Flag, A3 = Apple, B3 = TRUE, etc. C2 must house a 0. In C3 enter & copy down: =IF(B3=TRUE,LOOKUP(9.99999999999999E+307,$C$2:C2)+ 1,"") In D1 enter: =LOOKUP(9.99999999999999E+307,C:C) In D2 enter: Result List In D3 enter & copy down: =IF(ROW()-ROW(D$3)+1<=$D$1,LOOKUP(ROW()-ROW(D$3)+1,C:C,A:A),"") The area in from D3 on will show the desired result list. Henrik wrote: Does anyone have any suggestions as to how to build a function that automatically selects the next observation with a particular value assigned to it? For instance, I have a dataset that looks like this (where column A contains a list of names and column B contains a corresponding value/toggle that can be either TRUE or FALSE): Apple TRUE Banana TRUE Lemon TRUE Orange FALSE Grapefruit TRUE As the desired function is dragged down, it will only select observations with a TRUE VALUE in column B. The result would be the following list of names. If the Lemon toggle was changed to FALSE, the list would no longer contain Lemon. Apple Banana Lemon Grapefruit Thanks, Henrik |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make a cell empty based on condition | Charts and Charting in Excel | |||
Selecting data from a list based on entered values | Excel Discussion (Misc queries) | |||
limit cell list selection based on the selection of another list | Excel Worksheet Functions | |||
Adding different validations based on condition | Excel Worksheet Functions | |||
Cannot sum values based on condition | Excel Worksheet Functions |