# Simple One

#### Liverpool59

##### New Member
I want to enter dolar values in column "B". B2 has my starting value. Each time I want to calculate say B5/B2 and in C5 show a dollar gain or loss, and in D5 show the percentage comparing to the starting value.

The formula I want for columns C & D is easy, except I want no answer in B has no value.

Here is what I want.... C5=B5-B2 if B5 is greater than or show zero, and I want the same for D5=B5/B2 only if B5 is greater tan zero

Start - Dec 19, 2006 \$22,627.32
18-Jul-07 \$24,128.53 \$1,501.21 106.63%
-\$24,128.53 0.00%
\$0.00 #DIV/0!
\$0.00 #DIV/0!
\$0.00 #DIV/0!
\$0.00 #DIV/0!
\$0.00 #DIV/0!

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

#### Joe4

##### MrExcel MVP, Junior Admin
In D5, if you have =B5/B2, but only want it to calculate if B2>0, then use an IF formula, i.e.

=IF(B2>0,B5/B2,"")

Same logic can be applied to the other formulas.

#### Liverpool59

##### New Member
I like the formula. It works. But when I copy down.... I want the "B2" to stay constant

#### Smitty

##### Legend
Since it's a bit late for Joe to chime in (wrong time zone)...Check out Absolute References in the helpfile:

=IF(\$B\$2>0,B5/\$B\$2,"")

HTH,

Smitty

Replies
1
Views
91
Replies
4
Views
105
Replies
0
Views
103
Replies
4
Views
331
Replies
3
Views
807

1,190,613
Messages
5,981,928
Members
439,743
Latest member
KatieO

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back