I am trying to write a formula for the following:
if(and(d3="normal credit",d3="loans-gen credit"),-e3,
if(and(d3="normal debit",d3="loans-gen debit"),+e3
I get the end result of FALSE.
Is there another formula solution for multiple questions?
I need the following result: | ||
Normal Credit | 352.07 | (352.07) |
Loans-Gen Debit | 3.28 | 3.28 |
Loans-Gen Debit | 23.89 | 23.89 |
Loans-Gen Credit | 3,558.95 | (3,558.95) |
Loans-Gen Credit | 401.58 | (401.58) |
Normal Debit | 103,537.78 | 103,537.78 |
Normal Debit | 314,716.94 | 314,716.94 |
Normal Credit | 134,282.16 | (134,282.16) |
Excel 2010 | |||||
---|---|---|---|---|---|
D | E | F | |||
3 | Normal Credit | 100 | 100 | ||
4 | Normal Debit | 200 | -200 | ||
5 | Service Charge | 10 | |||
6 | Loans-Gen Credit | 300 | 300 | ||
7 | Loans-Gen Debit | 400 | -400 | ||
8 | Monthly Fee | 20 | |||
9 | Normal Credit | 500 | 500 | ||
10 | Normal Debit | 600 | -600 | ||
Sheet13 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F3 | =IF(OR(D3={"Normal Credit","Loans-Gen Credit"}),E3,IF(OR(D3={"Normal Debit","Loans-Gen Debit"}),-E3,"")) | |
F6 | =IF(ISNUMBER(SEARCH("Credit",D6)),E6,IF(ISNUMBER(SEARCH("Debit",D6)),-E6,"")) | |
F9 | =IF(OR(D9={"Normal Credit","Loans-Gen Credit"}),E9,-E9) |
Excel 2010 | |||||
---|---|---|---|---|---|
D | E | F | |||
3 | Normal Credit | 100 | -100 | ||
4 | Normal Debit | 200 | 200 | ||
5 | Service Charge | 10 | |||
6 | Loans-Gen Credit | 300 | -300 | ||
7 | Loans-Gen Debit | 400 | 400 | ||
8 | Monthly Fee | 20 | |||
9 | Normal Credit | 500 | -500 | ||
10 | Normal Debit | 600 | 600 | ||
Sheet13 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F3 | =IF(OR(D3={"Normal Credit","Loans-Gen Credit"}),-E3,IF(OR(D3={"Normal Debit","Loans-Gen Debit"}),E3,"")) | |
F6 | =IF(ISNUMBER(SEARCH("Credit",D6)),-E6,IF(ISNUMBER(SEARCH("Debit",D6)),E6,"")) | |
F9 | =IF(OR(D9={"Normal Credit","Loans-Gen Credit"}),-E9,E9) |
I am trying to write a formula for the following:
if(and(d3="normal credit",d3="loans-gen credit"),-e3,
if(and(d3="normal debit",d3="loans-gen debit"),+e3
I get the end result of FALSE.
Is there another formula solution for multiple questions?
No, I see that is an error in my formula. The cell d3 can be any of 4 options - normal debit, normal credit, loans-gen debit or loans-gen credit. If the cell is normal debit or loans-gen debit I need the formal to bring back the positive result in E3 (which will always be a number). If D3 is normal credit or loans-gen credit, I need the result to be -e3 (the negative of e3).
I need the following result: Normal Credit 352.07 (352.07) Loans-Gen Debit 3.28 3.28 Loans-Gen Debit 23.89 23.89 Loans-Gen Credit 3,558.95 (3,558.95) Loans-Gen Credit 401.58 (401.58) Normal Debit 103,537.78 103,537.78 Normal Debit 314,716.94 314,716.94 Normal Credit 134,282.16 (134,282.16)
<tbody>
</tbody>
A | B | C | D | E | F | G | |
1 | Col D | Col E | Col F | ||||
2 | Normal Credit | 352,07 | -352,07 | ||||
3 | Loans-Gen Debit | 3,28 | 3,28 | ||||
4 | Loans-Gen Debit | 23,89 | 23,89 | ||||
5 | Loans-Gen Credit | 3.558,95 | -3.558,95 | ||||
6 | Loans-Gen Credit | 401,58 | -401,58 | ||||
7 | Normal Debit | 103.537,78 | 103.537,78 | ||||
8 | Normal Debit | 314.716,94 | 314.716,94 | ||||
9 | Normal Credit | 134.282,16 | -134.282,16 | ||||
10 | |||||||
*** | ** | ** | ** | **************** | *********** | ************ | ** |
Thank you!!!Hi,
Looking at your sample, I think you need the OR function rather than AND.
If you have Other possible terms in D3, use formula in F3.
If the Key words are "Credit", and "Debit", you can use the formula in F6.
If there are no Other possible terms in D3 Other than ?Credit, and ?Debit, you can use the formula in F9.
Excel 2010
D E F 3 Normal Credit 100 100 4 Normal Debit 200 -200 5 Service Charge 10 6 Loans-Gen Credit 300 300 7 Loans-Gen Debit 400 -400 8 Monthly Fee 20 9 Normal Credit 500 500 10 Normal Debit 600 -600
<colgroup><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>Sheet13
Worksheet Formulas
Cell Formula F3 =IF(OR(D3={"Normal Credit","Loans-Gen Credit"}),E3,IF(OR(D3={"Normal Debit","Loans-Gen Debit"}),-E3,"")) F6 =IF(ISNUMBER(SEARCH("Credit",D6)),E6,IF(ISNUMBER(SEARCH("Debit",D6)),-E6,"")) F9 =IF(OR(D9={"Normal Credit","Loans-Gen Credit"}),E9,-E9)
<thead>
</thead><tbody>
</tbody>
<tbody>
</tbody>