Hiding a cell if value equals X
Solved/Closed
Hello,
I want to do the following in EXCEL.
I have a formula which works out the cost of one item at $35 plus adds $3.8 per item thereafter. Tf the cell i am putting my equation in is D5 and the cell with the quantity of items is C5 then my equation would look as follows.
D5 = 35+((C5-1)*3.8)
So if C5 = 1 then the answer is $35 which is correct
and if C5 = 2 then the answer is $38.80
BUT if C5 = 0 then I want the cell to display Zero???? ANY IDEAS?
I want to do the following in EXCEL.
I have a formula which works out the cost of one item at $35 plus adds $3.8 per item thereafter. Tf the cell i am putting my equation in is D5 and the cell with the quantity of items is C5 then my equation would look as follows.
D5 = 35+((C5-1)*3.8)
So if C5 = 1 then the answer is $35 which is correct
and if C5 = 2 then the answer is $38.80
BUT if C5 = 0 then I want the cell to display Zero???? ANY IDEAS?
Related:
- Based on the values in cells b77 b81 what function can automatically return the value in cell c77
- If a cell has text then return value ✓ - Excel Forum
- If cell contains date then return value ✓ - Office Software Forum
- Based on the values in cells b77 b88 what function can - Excel Forum
- Insert a function in cell b2 to display the current date from your system. ✓ - Excel Forum
- Based on the values in cells b77:b81, what function can automatically return the value in cell c77 ✓ - Excel Forum
1 response
Hello Aimee,
Use the IF function:
=IF(35+((C5-1)*3,8)<35;0;35+((C5-1)*3,8))
If the result of your formula is smaller then 35 then display a 0,
If the result of your formula is the same or bigger then 35 then display the result of your formula.
Hope this is what you were looking for.
Best regards,
Trowa
Use the IF function:
=IF(35+((C5-1)*3,8)<35;0;35+((C5-1)*3,8))
If the result of your formula is smaller then 35 then display a 0,
If the result of your formula is the same or bigger then 35 then display the result of your formula.
Hope this is what you were looking for.
Best regards,
Trowa
Jul 22, 2009 at 12:45 AM
Thanks for your help! New it would need an IF formula but had no clue how to word it!
Yours looks like it should work, but when I try type it in excel it gives me an error saying that "The formula you typed contains an error" any ideas on why?
Really hope you can help!
Aimee
Jul 22, 2009 at 01:24 AM
Tried it again and it does work!
Thanks a million!
Jul 22, 2009 at 01:28 AM
Worked out what was wrong, in your formula you had ; where it should of been , !
So happy to finally have the answer to this! You are a lifesaver!