Excel Issue - Return a zero unless all blanks are filled in.

S

Sprinkles

Thank you for your attention to my amateur problem. I am in a tim
crunch to create a spreadsheet others can use by tomorrow.

In column A, I have a list of lab results. In column B I have a lis
of moving ranges based off those results calculated from the formula
ABS(B2-B1), etc.

This is a sheet that will be used for various tests, so I made room fo
many results to be entered, however some analysts may not need al
those spaces. So I get something such as:

Result MR
1
2------------1
4------------2
5------------1
7------------2
-------------7

That last moving range of seven is counting the empty cell as zero. I
there a way to have Excel either not calculate unless both cells ar
filled in, or give a zero if one is a blank, etc.?

The moving ranges are used in further calculations and that hangin
moving range is causing problems.

Thank you for your help and have a good day
 
T

Trevor Shuttleworth

Sprinkles

in B2, put the formula: =IF(A2<>"",A2-A1,"") and drag down.

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top