ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   only return true values (https://www.excelbanter.com/excel-discussion-misc-queries/183205-only-return-true-values.html)

John M[_2_]

only return true values
 
I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.

E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female

In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...

Dave Peterson

only return true values
 
How about an alternative?

Add headers in row 1
Select your range (A1:Bxxx)
Data|Filter|Autofilter
Use the arrow over the header in B1 to show just the females.



John M wrote:

I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.

E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female

In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...


--

Dave Peterson

Gary''s Student

only return true values
 
You don't need an IF statement, just use AutoFilter. You can display a
column of just female names, copy them, and paste them elsewhere.
--
Gary''s Student - gsnu200778


"John M" wrote:

I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.

E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female

In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...


John M

only return true values
 
Sorry. The example below is just a basic example. the project I am working on
is more complex. Basically I want to return the desired values in another
sheet and where the conditional value changes it changes the results.

"Gary''s Student" wrote:

You don't need an IF statement, just use AutoFilter. You can display a
column of just female names, copy them, and paste them elsewhere.
--
Gary''s Student - gsnu200778


"John M" wrote:

I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.

E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female

In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...


Pete_UK

only return true values
 
Advanced Filter could probably do this for you. Debra Dalgleish has
some comprehensive notes he

http://www.contextures.com/xladvfilter01.html

Hope this helps.

Pete

On Apr 10, 3:52*pm, John M wrote:
Sorry. The example below is just a basic example. the project I am working on
is more complex. Basically I want to return the desired values in another
sheet and where the conditional value changes it changes the results.



"Gary''s Student" wrote:
You don't need an IF statement, just use AutoFilter. *You can display a
column of just female names, copy them, and paste them elsewhere.
--
Gary''s Student - gsnu200778


"John M" wrote:


I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.


E.G
A * * * * * * B * * * * * * C
John * * * *Male * * * *Mary
Mary * * * Female * *Jane
Paul * * * *Male
Simon * * Male
Jane * * * Female


In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...- Hide quoted text -


- Show quoted text -



John M

only return true values
 
Thanks Pete

yes this helps but it only works if i want the data that is copied over to
remain static. Any ideas on how if the data changes that it can be
automatically updated in the next sheet?

"Pete_UK" wrote:

Advanced Filter could probably do this for you. Debra Dalgleish has
some comprehensive notes he

http://www.contextures.com/xladvfilter01.html

Hope this helps.

Pete

On Apr 10, 3:52 pm, John M wrote:
Sorry. The example below is just a basic example. the project I am working on
is more complex. Basically I want to return the desired values in another
sheet and where the conditional value changes it changes the results.



"Gary''s Student" wrote:
You don't need an IF statement, just use AutoFilter. You can display a
column of just female names, copy them, and paste them elsewhere.
--
Gary''s Student - gsnu200778


"John M" wrote:


I want to only return the true values, in consecutive cells, from an IF
statement. Is this possible? Currently using an IF statement and I can't do
this.


E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female


In the above example I just want to return the names of all females.
therefore column C is my desired result. Any help appreciated...- Hide quoted text -


- Show quoted text -




Pete_UK

only return true values
 
I don't know of any automatic way to make filters become dynamic, other than
using a macro. Perhaps if you double-click on one of the criteria cells as
if to edit it, and then press <enter.

Hope this helps.

Pete

"John M" wrote in message
...
Thanks Pete

yes this helps but it only works if i want the data that is copied over to
remain static. Any ideas on how if the data changes that it can be
automatically updated in the next sheet?

"Pete_UK" wrote:

Advanced Filter could probably do this for you. Debra Dalgleish has
some comprehensive notes he

http://www.contextures.com/xladvfilter01.html

Hope this helps.

Pete

On Apr 10, 3:52 pm, John M wrote:
Sorry. The example below is just a basic example. the project I am
working on
is more complex. Basically I want to return the desired values in
another
sheet and where the conditional value changes it changes the results.



"Gary''s Student" wrote:
You don't need an IF statement, just use AutoFilter. You can display
a
column of just female names, copy them, and paste them elsewhere.
--
Gary''s Student - gsnu200778

"John M" wrote:

I want to only return the true values, in consecutive cells, from
an IF
statement. Is this possible? Currently using an IF statement and I
can't do
this.

E.G
A B C
John Male Mary
Mary Female Jane
Paul Male
Simon Male
Jane Female

In the above example I just want to return the names of all
females.
therefore column C is my desired result. Any help appreciated...-
Hide quoted text -

- Show quoted text -







All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com