ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   What if formulas and calculations - not true/false (https://www.excelbanter.com/new-users-excel/30663-what-if-formulas-calculations-not-true-false.html)

BJS

What if formulas and calculations - not true/false
 
I need to create a calculation based upon a number of fields e.g.
A1 = Y or N
B1 = Y or N
C1 = 32
D1 = a number
E1 is for the result

Required: If A1 = Y and B1 = Y then E1 = C1 * D1 else E1 = D1

All I can get is FALSE if either A1 or B1 is not Y but is both are Y then I
get the correct result


Niek Otten

=IF(AND(A1="Y",B1="Y"),C1*D1,D1)

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"BJS" wrote in message
...
I need to create a calculation based upon a number of fields e.g.
A1 = Y or N
B1 = Y or N
C1 = 32
D1 = a number
E1 is for the result

Required: If A1 = Y and B1 = Y then E1 = C1 * D1 else E1 = D1

All I can get is FALSE if either A1 or B1 is not Y but is both are Y then
I
get the correct result




JE McGimpsey

One way:

E1: =IF(AND(A1="Y",B1="Y"),C1*D1,D1)

In article ,
BJS wrote:

I need to create a calculation based upon a number of fields e.g.
A1 = Y or N
B1 = Y or N
C1 = 32
D1 = a number
E1 is for the result

Required: If A1 = Y and B1 = Y then E1 = C1 * D1 else E1 = D1

All I can get is FALSE if either A1 or B1 is not Y but is both are Y then I
get the correct result



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

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