ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining IF Statements (https://www.excelbanter.com/excel-worksheet-functions/119946-combining-if-statements.html)

Carl

Combining IF Statements
 


I am trying to combine these 3 IF statements. Can't seem to get it to work.

if q11="A" then 0

if q11="OK" and k11="Buy" then (N11-M11)*L11*100) otherwise
(M11-O11)*L11*100)

if q110 and k11="Buy" then (N11-r11)*L11*100) otherwise
(r11-O11)*L11*100)


ColQ can contain numbers or text.

Thank you in advance


Teethless mama

Combining IF Statements
 
=IF(Q11="A",0,IF(AND(Q11="OK",K11="Buy"),(N11-M11)*L11*100,(M11-O11)*L11*100))


"carl" wrote:



I am trying to combine these 3 IF statements. Can't seem to get it to work.

if q11="A" then 0

if q11="OK" and k11="Buy" then (N11-M11)*L11*100) otherwise
(M11-O11)*L11*100)

if q110 and k11="Buy" then (N11-r11)*L11*100) otherwise
(r11-O11)*L11*100)


ColQ can contain numbers or text.

Thank you in advance


daddylonglegs

Combining IF Statements
 
Hello carl, this isn't possible without guesswork unless you give more
information

You have 2 "otherwises", which one applies if none of your conditions are met?

"carl" wrote:



I am trying to combine these 3 IF statements. Can't seem to get it to work.

if q11="A" then 0

if q11="OK" and k11="Buy" then (N11-M11)*L11*100) otherwise
(M11-O11)*L11*100)

if q110 and k11="Buy" then (N11-r11)*L11*100) otherwise
(r11-O11)*L11*100)


ColQ can contain numbers or text.

Thank you in advance



All times are GMT +1. The time now is 02:34 AM.

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