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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_beeDirector of Information TechnologyCommented:
Is this what you are looking for?  

Here is the excel file.


Please see attached.

Does that do what you want?

I have entered a calculation in the percentage column, but you might be defining that percentage differently, so please check before using.


yo_beeDirector of Information TechnologyCommented:
I made a mistake in my formula

should have been after seeing Alan's xlsx file

Open in new window

Either one (Iferror or If) of the function get you the desired results.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Hi Luis,

Maybe you need...

In C2

Open in new window

and copy it down.

In D2 (for percentage change between Old and New Cost)

Open in new window

and copy it down.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yo_beeDirector of Information TechnologyCommented:

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.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
That's the formula used for calculating the percentage change.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
In other words, B2/A2-1 is equivalent to (B2-A2)/A2.
yo_beeDirector of Information TechnologyCommented:
LUIS FREUNDAuthor Commented:
AWESOME!  Thanks guys!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.