#### SlapandTickle

##### New Member
Hi all,

I'm new to Excel and totally overwhelmed trying to master it. In my spreadsheet that will keep track of my stock investments, I want Column H (total profit) to subtract \$10 from every answer to factor in commission fees. My formula for Column H is: =(E3-D3)*F3-10, where E3 is my sale price, D3 is my purchase price, and F3 is the number of shares purchased.

My problem is that when I drag this formula down to H4, H5, H6, H7, etc..., I get -\$10 down the entire column. Is there any way to make these other cells blank until I enter a buy and sale price in E and D?

Any help would be greatly appreciated! Thank you.

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

#### Michael M

##### Well-known Member
If D,E or F are blank this will return a blank in H
ANd you can drag it down

Code:
``=IF(OR(D3="",E3="",F3=""),"",(E3-D3)*F3-10)``

Thank you!!!!

Replies
0
Views
20
Replies
1
Views
290
Replies
11
Views
558
Replies
4
Views
155
Replies
0
Views
291

1,109,522
Messages
5,529,330
Members
409,863
Latest member
stacy09