Assuming Zero in Empty Cells

clupher

New Member
Joined
May 19, 2011
Messages
7
I have numbers in each of 10 cells horizontally across the excel page (A1 thru J1). In cell K1 I have the following formula =SUM(LARGE(A2:J2,{1,2,3,4,5,6,7,8,9})). Is there a way that if the numbers were missing for 2 or more cells in A1 thru J1 that it would just assign the blank cells a value of zero? If I remove the data/numbers from 2 or more cells in A1 thru J1 then my formula in K1 says #NUM!. Thanks so much.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Thanks for the prompt reply. However, the ISERROR route only returns zero in cell K1. I wondered if there is a way that the formula for returning the sum of largest 9 values would still work when 2 or more of the cells were blank. I would like for the computation to just assume one that if two cells or more are blank to just assume the value is zero for those blank cells but still want the formula to bring back the sum of the largest 9 (even if two or more of those cells turn out to have a value of zero). I was hoping to not have to use two different columns and am now curious if this can be done within one formula.
 
Upvote 0
Try =SUM(IFERROR(LARGE(A1:J1, {1,2,3,4,5,6,7,8,9}), 0))

... confirmed with Ctrl+Shift+Enter
 
Upvote 0
How can I copy the row number and column letter into this thread? I would like to send an example of exactly what I am trying to do in excel?
 
Upvote 0
Follow the link to Excel Jeanie in post #3.
 
Upvote 0
It is best if a describe an example. Here is what I am trying to achieve in a formula.
Assume the following:

cell A1=70
cell B1=80
cell C1=90
cell D1=100
cell E1=sum(large(a1:d1,{1,2,3}))

cell E should then give the answer 270. However, if I remove the data in cells A1 and B1 then I want cell E1 to give answer of 190. Assume the information in each cell is a test grade and I want E1 to provide me with the top 3 grades; however, some students might not take more than 1 test and the cells in 2 or more cells might be blank. I just want the blank cells to be assumed to provide a test grade of zero for those blank cells but still sum the the tests they did take.
 
Upvote 0
I tried that formula and when I remove cell A1 and B1 cell E1 should have popped up with answer of 190 but instead it is just giving me the answer of 100.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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