![]() |
using IF function with AND/OR
Hi
I have successfully used the IF function on my worksheet so that if two conditions are met it will do one calculation or another However I'd like to know if its possible to get it to work with three conditions e.g if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just ignore the calculation and enter a zero or a blank space. I've got as far as nesting the first logical part which works e.g. =IF(AND(A1="y",B1="y"),F1*5%,F1*10%) But it falls over if A1 is anything other than "y". How can I get it to do the first if/then but ignore them both if A1 does not = "y"? I hope this is clear and there isn't too much repetition. Thanks very much for your time and assistance Ian |
using IF function with AND/OR
One way:
=IF(A1<"Y",0,IF(AND(A1="y",B1="y"),F1*5%,F1*10%)) Ian R wrote: Hi I have successfully used the IF function on my worksheet so that if two conditions are met it will do one calculation or another However I'd like to know if its possible to get it to work with three conditions e.g if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just ignore the calculation and enter a zero or a blank space. I've got as far as nesting the first logical part which works e.g. =IF(AND(A1="y",B1="y"),F1*5%,F1*10%) But it falls over if A1 is anything other than "y". How can I get it to do the first if/then but ignore them both if A1 does not = "y"? I hope this is clear and there isn't too much repetition. Thanks very much for your time and assistance Ian -- Dave Peterson |
using IF function with AND/OR
=IF(A1<"Y",0,IF(AND(A1="Y",B1="Y"),0.05,0.1)*F1)
"Ian R" wrote: Hi I have successfully used the IF function on my worksheet so that if two conditions are met it will do one calculation or another However I'd like to know if its possible to get it to work with three conditions e.g if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just ignore the calculation and enter a zero or a blank space. I've got as far as nesting the first logical part which works e.g. =IF(AND(A1="y",B1="y"),F1*5%,F1*10%) But it falls over if A1 is anything other than "y". How can I get it to do the first if/then but ignore them both if A1 does not = "y"? I hope this is clear and there isn't too much repetition. Thanks very much for your time and assistance Ian |
using IF function with AND/OR
"Ian R" wrote in message ... Hi I have successfully used the IF function on my worksheet so that if two conditions are met it will do one calculation or another However I'd like to know if its possible to get it to work with three conditions e.g if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just ignore the calculation and enter a zero or a blank space. I've got as far as nesting the first logical part which works e.g. =IF(AND(A1="y",B1="y"),F1*5%,F1*10%) But it falls over if A1 is anything other than "y". How can I get it to do the first if/then but ignore them both if A1 does not = "y"? I hope this is clear and there isn't too much repetition. Thanks very much for your time and assistance Ian Dave & Mama Thanks guys - worked a treat! I've been pulling my hair out on this one for ages. I humbly bow in my appreciation to you Guru's! Ian I^) |
using IF function with AND/OR
=IF(A1<"y",0,IF(B1="y",F1*5%,F1*10%))
[You don't need the AND(A1="y",B1="y"), because you don't get to the second test unless A1="y".] -- David Biddulph "Ian R" wrote in message ... Hi I have successfully used the IF function on my worksheet so that if two conditions are met it will do one calculation or another However I'd like to know if its possible to get it to work with three conditions e.g if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just ignore the calculation and enter a zero or a blank space. I've got as far as nesting the first logical part which works e.g. =IF(AND(A1="y",B1="y"),F1*5%,F1*10%) But it falls over if A1 is anything other than "y". How can I get it to do the first if/then but ignore them both if A1 does not = "y"? I hope this is clear and there isn't too much repetition. Thanks very much for your time and assistance Ian |
All times are GMT +1. The time now is 04:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com