ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I nest IF statements to only return value if both true? (https://www.excelbanter.com/excel-worksheet-functions/104786-how-do-i-nest-if-statements-only-return-value-if-both-true.html)

kvnexcel

How do I nest IF statements to only return value if both true?
 
I have a cell, M30, in which I want to display contents copied from another
cell (D18), provided that two different conditions are met: K24=Y and M29
has some text content in it already. Otherwise, M30 is blank.
The basic IF statement I've written for M30 is =IF(k24="y",D18,""), but
that only takes care of the first condition. How do I make it test for the
second condition, that M29 has some text in it?

Biff

How do I nest IF statements to only return value if both true?
 
Hi!

Try this:

=IF(AND(K24="Y",M29<""),D18,"")

Biff

"kvnexcel" wrote in message
...
I have a cell, M30, in which I want to display contents copied from another
cell (D18), provided that two different conditions are met: K24=Y and
M29
has some text content in it already. Otherwise, M30 is blank.
The basic IF statement I've written for M30 is =IF(k24="y",D18,""), but
that only takes care of the first condition. How do I make it test for the
second condition, that M29 has some text in it?




kvnexcel

How do I nest IF statements to only return value if both true?
 
BIFF -- Worked like a charm! Thanks.

"Biff" wrote:

Hi!

Try this:

=IF(AND(K24="Y",M29<""),D18,"")

Biff

"kvnexcel" wrote in message
...
I have a cell, M30, in which I want to display contents copied from another
cell (D18), provided that two different conditions are met: K24=Y and
M29
has some text content in it already. Otherwise, M30 is blank.
The basic IF statement I've written for M30 is =IF(k24="y",D18,""), but
that only takes care of the first condition. How do I make it test for the
second condition, that M29 has some text in it?





Biff

How do I nest IF statements to only return value if both true?
 
You're welcome. Thanks for the feedback!

Biff

"kvnexcel" wrote in message
...
BIFF -- Worked like a charm! Thanks.

"Biff" wrote:

Hi!

Try this:

=IF(AND(K24="Y",M29<""),D18,"")

Biff

"kvnexcel" wrote in message
...
I have a cell, M30, in which I want to display contents copied from
another
cell (D18), provided that two different conditions are met: K24=Y and
M29
has some text content in it already. Otherwise, M30 is blank.
The basic IF statement I've written for M30 is =IF(k24="y",D18,""),
but
that only takes care of the first condition. How do I make it test for
the
second condition, that M29 has some text in it?








All times are GMT +1. The time now is 06:52 PM.

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