ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   logic test (https://www.excelbanter.com/excel-worksheet-functions/49402-logic-test.html)

toolman

logic test
 
What formula would I use to say: [M2] = [H2] if [K2=yes], [M2] = [J2] if
[K2=no], when cells [M2], [H2], and [J2] are dollar amounts, and [K2] is
actually the word "yes" or "no"?

Peo Sjoblom

What if K2 is neither yes or no? If K2 is always either yes or no you only
need one test

=IF(K2="yes",H2,J2)

if K2 can be blank

=IF(K2="","",IF(K2="yes",H2,J2))


--
Regards,

Peo Sjoblom

(No private emails please)


"toolman" wrote in message
...
What formula would I use to say: [M2] = [H2] if [K2=yes], [M2] = [J2] if
[K2=no], when cells [M2], [H2], and [J2] are dollar amounts, and [K2] is
actually the word "yes" or "no"?



toolman

Thanks so much! This was driving me cazy!

"Peo Sjoblom" wrote:

What if K2 is neither yes or no? If K2 is always either yes or no you only
need one test

=IF(K2="yes",H2,J2)

if K2 can be blank

=IF(K2="","",IF(K2="yes",H2,J2))


--
Regards,

Peo Sjoblom

(No private emails please)


"toolman" wrote in message
...
What formula would I use to say: [M2] = [H2] if [K2=yes], [M2] = [J2] if
[K2=no], when cells [M2], [H2], and [J2] are dollar amounts, and [K2] is
actually the word "yes" or "no"?





All times are GMT +1. The time now is 01:39 AM.

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