Help-How to return a zero if a cell = FALSE

wmichael

Board Regular
Joined
Aug 26, 2014
Messages
113
Office Version
  1. 365
  2. 2019
  3. 2007
Platform
  1. Windows
  2. Mobile
Hello. This formula is used to copy the amount of Q41-15% if TRUE is working, but I also want to return a zero if R41=FALSE so the cell is not empty.

I appreciate in advance any suggestions you have to remedy this matter.

Thank you.

=IF(R41=TRUE,Q41-(Q41*0.15),"")
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
A very minor edit to your formula (as long as R41 os only ever TRUE or FALSE):
Rich (BB code):
=IF(R41=TRUE,Q41-(Q41*0.15),0)
 
Upvote 0
You are welcome.

The key is the structure of the IF function, which has three arguments:
=IF(condition, what to return if condition is true, what to return if condition is false)
 
Upvote 0
Solution
You are welcome.

The key is the structure of the IF function, which has three arguments:
=IF(condition, what to return if condition is true, what to return if condition is false)
@Joe4, I also want to add a second condition. =IF(R41=TRUE,Q41-(Q41*0.15),0) and if K41=x. Might you have any thoughts about how to do this? Thank you.
 
Last edited:
Upvote 0
Excel Formula:
=IF(AND(R41=TRUE,K41="x"),Q41-(Q41*.15),0)
 
Last edited:
Upvote 0
You can also drop the '=TRUE' part if you wish as:
Excel Formula:
=IF(R41,"Yes","No")
Will calculate the same as:
Excel Formula:
=IF(R41=TRUE,"Yes","No")
 
Upvote 0
You all made my day! Thank you all for your help on this.
 
Upvote 0
Glad we were able to help!

Note that when marking post as the solution, you want to mark the post that answers your original question (and not any follow-ups and variations).
The way that it works is that when you mark a post as the solution, it shows the initial question at the top and the solutionjust below it. So if the solution answers something that wasn't asked in the original question, it doesn't make much sense.
I went back and changed it back to what you had originally. You can "Like" as many replies as you want in a thread, but only one post can be marked as the "Solution".
 
Upvote 0

Forum statistics

Threads
1,215,436
Messages
6,124,869
Members
449,192
Latest member
MoonDancer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top