Help for Noob

naissusnis

New member
Joined
Sep 10, 2018
Messages
1
Reaction score
0
Points
0
Excel Version(s)
2016
Hi good people,

I need help with formula

A B C D E
100YY7525

A=100
B=Y
C=Y
D=Number
E=A-D

For E I use this formula: =IF(AND(B2="y", C2="y"), A2-D2, "") and its wotking if B2 and C2 are ="Y"

I need to add
if B2 is Y and C2 is blank then the value of D2 has to be the same as A2 (E2 should be blank)
if C2 is Y and B2 is blank then the value of E2 has to be the same as A2 (D2 has to be blank)

if B2 and C2 are Y the E2 should be formula above.

I will supply the number for D2 or E2

So I need to have all three statements working


I really appreciate the help.

Thanks

Sasha
 
.
Here is one way - there are probably more :

In E2 (or your choice of cell) paste :
Code:
=IF(AND(B2="y",C2="y"),A2-D2,IF(AND(B2="",C2="y"),A2,IF(AND(B2="y",C2=""),A2,"")))
 
Hi ans welcome
your thread's title should be descriptive of your problem, so more members will know what it's about
 
Back
Top