Link to home
Start Free TrialLog in
Avatar of LUIS FREUND
LUIS FREUND

asked on

Calculating with blanks in excel

I wanted to calculate total savings and percentages with blanks, for example if column B is blank then I the calculation should be blank as well in column C, this applies to column D for percentage difference as well..  See attachment.
C--Users-lfreund-Downloads-COST.xlsx
Avatar of yo_bee
yo_bee
Flag of United States of America image

Is this what you are looking for?  

User generated image
Here is the excel file.

C--Users-lfreund-Downloads-COST.xlsx
SOLUTION
Avatar of Alan
Alan
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@subodh

What is the -1 for?  This will skew the value off by 1.  

Column with Number value - Blank  or Blank - Number value will just give the result a + or -.  From my POV the =IF(OR(A2="",B2=""),"",A2-B2) makes the formula much more complicated.  
I think that the suggestion that I made is the cleanest and addresses whether A# or B# are blank without any worry if I missed something.  I know my screenshot has an incorrect formula, but I did acknowledge it after seeing Alan's spreadsheet.
That's the formula used for calculating the percentage change.
In other words, B2/A2-1 is equivalent to (B2-A2)/A2.
Ok.
Avatar of LUIS FREUND
LUIS FREUND

ASKER

AWESOME!  Thanks guys!