 • 461K Members
• 6,238 Online
• 559K Conversations
SOLVED

# How to use the Subtract with IF function ?

Hi everyone,

Actually, I need some help about How I can use subtract with IF function Or any other way ?

For example: If A>0 , make (B - C).

How I can use it on Excel, Please :)

10 Replies

# Re: How to use the Subtract with IF function ?

Hi,

Let me show you a simple example as follows.

`=IF(A2>0,B2-C2,A2)` The above formula says:

IF cell A2 greater than 0, then subtract cell C2 from B2 and return the result.

Otherwise, return the value of cell A2 as it is.

Hope that helps

# Re: How to use the Subtract with IF function ?

Firstly, thank you for help my brother :).

Thank you again.

HAITHAM :)

# Re: How to use the Subtract with IF function ?

Hi,

Sorry for the late reply, but I didn't understand what you need!

Please tell me what the wrong in the formula or give me examples on some cases and what the formula should return in them?

# Re: How to use the Subtract with IF function ?

Don't worry my brother.

Now, I hope to understand me Lol

I put example down :)

Solution

# Re: How to use the Subtract with IF function ?

Okay, I've updated the workbook with this formula in AV Balance cell.

`=IF(D6>0,0,10000)`

If you want to change the AV Balance, you can change it in the formula from 10000 to something else.

I hope this helps you

Regards

# Re: How to use the Subtract with IF function ?

That is right, great.

Thank you so much Mr.Amairah.

Best Regards

HAITHAM

# Re: How to use the Subtract with IF function ?

`=IF(D6>0,0,10000)`

Can I add other same cell in this function ?

# Re: How to use the Subtract with IF function ?

Hi,

Yes, you can do this by using OR function as follows:

`=IF(OR(D6>0,D9>0),0,10000)`

The above formula says:

If either cell D6 or cell D9 is greater than 0, then return 0, otherwise, show the AV Balance which is 10000.

Also, you can replace OR with AND function to check if both cells are greater than 0.

The difference is that AND requires both cells to be greater than 0 in order to return 0.

Regards,

Haytham

# Re: How to use the Subtract with IF function ?

Can I talk to you in any app ?

# Re: How to use the Subtract with IF function ?

You can open my profile here and send me a private message.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies