Formula and approach to problem

gilbert

Board Regular
Joined
Jun 13, 2002
Messages
141
I have a sheet for house remodeling expenses. It is hard to explain what I am trying to do.
Col A house addresss
Col B has square footage
Col C starts the various expense such as cabinets then D has painting and E has Plumbing

What I am trying to do is if I have 20 houses and I get to col C for house number 1 I tell it to divide the cost for painting that house by the sqft of that house to get a per sqft cost to paint. But I need for the painting col to sum all of the painting costs for all 20 houses which it does but I want it to only divide by the number of houses that I actually painted because some I did not paint. I mean if I only needed to paint 5 of the houses then the total cost of the painting for those 5 then gets divided by 20 houses. How can I get the sheet to ingore totaling the houses that have 0.00 in the cell meaning no paint cost is associated with this house.

Thanks for any help.

Galen
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
=AVERAGE(IF(Range,Range))

which must be entered by using control+shift+enter, not just enter.

Equivalently...

=SUM(Range)/MAX(1,COUNT(Range)-COUNTIF(Range,0))

which is ordinarily entered.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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