Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 01:01 PM
Selecting data from a list based on entered values GrantM Excel Discussion (Misc queries) 1 December 20th 04 10:59 AM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM
Adding different validations based on condition Solis Excel Worksheet Functions 1 December 3rd 04 04:37 PM
Cannot sum values based on condition Ned Flanders Excel Worksheet Functions 1 December 3rd 04 04:36 AM


All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"