# excel formula for if 2 new conditions are satisfied



## vas6566 (Jan 4, 2023)

Hi, HAPPY NEW YEAR. I have come back to you after 2019 with a mild hiccup in creating one excel formula perfectly. Hope you can resolve it. I need a suitable formulae for the following subject.

IF cell B3 contains the value "A", at the same time only if cell H3 has a value greater than zero, it should return D3+E3-G3. that is if H3 has no value or its value is less than zero, no result is required. Here 2 conditions need to be fulfilled, the value in B3 should be exactly "A" and at the same time value in H3 should numeric value more than 0, if these two conditions are satisfied i need the value of D3+E3-G3, if these two conditions are not satisfied no value is required in the formula cell ( not necesary to add D3 and E3 and less G3 ). The following table may be self explanatory. pls respond , thank in advance


PARTICULARSUNITNet Block as per B/S- 01.04.2022Gross Block_AYM_ 1.4.2022AdditionsDepDeletionsNet Block as per B/S- 31-03-2023Gross Block_AYM_ 31.03.2023Result if formula is correctBuilding-HosurA3,84,745.00500000100003,85,745.00formula required501000Factory-Ayanambakkam New BuildingA9,44,195.0415000005500009,00,195.00formula required1555000Factory Buildg - (Mogappair A10 & B8)M94,60,755.000094,60,755.00formula required0Factory Building-Ayanambakkam - OldA1,90,120.001140000190120-formula required0Factory- Building- Sipcot, VallamA25,50,000.0030000002000005000027,00,000.00formula required3150000


----------



## Joe4 (Jan 4, 2023)

Try:

```
=IF(AND(B3="A",H3>0),D3+E3-G3,"")
```


----------



## vas6566 (Jan 4, 2023)

Joe4 said:


> Try:
> 
> ```
> =IF(AND(B3="A",H3>0),D3+E3-G3,"")
> ```


Hi, thanks a lot, it works perfectly. Really this a great help to the community. Thank you so much.  please let me know what does the symbol , "") mean at the end of the formula.


----------



## Joe4 (Jan 4, 2023)

vas6566 said:


> Hi, thanks a lot, it works perfectly. Really this a great help to the community. Thank you so much.  please let me know what does the symbol , "") mean at the end of the formula.


You are welcome.

Every IF formula has 3 parts to it:
*=IF(*_condition_, _what to return if condition is true_, _what to return if condition is false_*)*

"" is just an empty string.  So we are telling it to return the empty string if your condition is not satisfied, as you requested.


> if H3 has no value or its value is less than zero, no result is required.


----------



## vas6566 (Jan 5, 2023)

Joe4 said:


> You are welcome.
> 
> Every IF formula has 3 parts to it:
> *=IF(*_condition_, _what to return if condition is true_, _what to return if condition is false_*)*
> ...


Very very clear explanation. 🤝


----------

