Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Want to calculate a percentage by dividing one cell by the other,
I want to calculate a percentage, but don't want it to calculate if the cells
have a zero OR Negative numbers. How do I do this? |
#2
|
|||
|
|||
=if(A1<=0,0,A1/B1)
-- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "KMHarpe" wrote in message ... I want to calculate a percentage, but don't want it to calculate if the cells have a zero OR Negative numbers. How do I do this? |
#3
|
|||
|
|||
Nick Hodge wrote: "KMHarpe" wrote: I want to calculate a percentage, but don't want it to calculate if the cells have a zero OR Negative numbers. How do I do this? =if(A1<=0,0,A1/B1) More precisely (because the OP said "cells"): =if(or(A1<=0,B1<=0), 0, A1/B1) and format the cell appropriately. But the OP was unclear about what to do when the "cells" are zero or negative. Nick's solution puts a zero into the "percentage" cell. If you want the cell to remain empty, simply do: =if(or(A1<=0,B1<=0), "", A1/B1) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I CALCULATE A RUNNING PERCENTAGE | Excel Discussion (Misc queries) | |||
calculate monthly average percentage of change | Excel Worksheet Functions | |||
Calculate percentage based on cells with conditional formatting | New Users to Excel | |||
calculate percentage | Excel Worksheet Functions | |||
How do I create a formula to calculate the average percentage rat | Excel Worksheet Functions |