substitute a blank cell in a SUM function range with another cell that has a value

4653

New Member
Joined
Apr 20, 2012
Messages
27
Office Version
  1. 365
Platform
  1. Windows
I have 11 cells that are part of my question, A1, C1, C2, C3, C4, C5, E1, E2, E3, E4 and E5. A user will have an option to input an arbitrary value such as 200 or 400 into cells A1, C1, C2, C3, C4 and C5. The user must always enter a value into cell A1, however, each cell C1 through C5 will be optional (meaning they could enter a value into C1, C2 and C4 but leave C3 and C5 blank, or any combination possible). The values for cells E1 through E5 are already calculated via another formula and the user has no control over these values. What I need is a formula that will add cells C1 through C5 and divide it by the sum of E1 through E5. However, for each cell in C1 through C5 that is blank, the formula needs to use the value in A1 to calculate the answer. So using my previous example, the answer would turn out to be (C1+C2+A1+C4+A1)/(E1:E5). Any help would be much appreciated.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I have 11 cells that are part of my question, A1, C1, C2, C3, C4, C5, E1, E2, E3, E4 and E5. A user will have an option to input an arbitrary value such as 200 or 400 into cells A1, C1, C2, C3, C4 and C5. The user must always enter a value into cell A1, however, each cell C1 through C5 will be optional (meaning they could enter a value into C1, C2 and C4 but leave C3 and C5 blank, or any combination possible). The values for cells E1 through E5 are already calculated via another formula and the user has no control over these values. What I need is a formula that will add cells C1 through C5 and divide it by the sum of E1 through E5. However, for each cell in C1 through C5 that is blank, the formula needs to use the value in A1 to calculate the answer. So using my previous example, the answer would turn out to be (C1+C2+A1+C4+A1)/(E1:E5). Any help would be much appreciated.

Looks like...

Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(C1:C5),C1:C5,A1))/SUM(E1:E5)

Adjust to suit.
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,678
Members
449,179
Latest member
fcarfagna

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