Simple One

Liverpool59

New Member
Joined
Apr 26, 2006
Messages
8
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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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?

Disable AdBlock

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
Back
Top