Sum of six columns with certain conditions using if statement

nskatoch

Board Regular
Joined
Dec 30, 2013
Messages
53
Office Version
  1. 365
Platform
  1. Windows
C6​
D6​
E6​
F6​
G6​
H6​
I6​
TOTAL(Sum of Six Columns.
Max. marks
80​
80​
80​
80​
80​
80​
80​
480​
SAN40706050254045
JOHN30354026404522

In the above table, I want Sum of six columns out of seven with the following conditions,
IF (F6<27, SUM(C6,D6,E6,G6,H6,I6),
IF (G6<27, SUM (C6,D6,E6,F6,H6,I6)
IF (H6<27, SUM(C6,D6,E6,F6,G6,I6)
IF (I6<F6, SUM(C6,D6,E6,F6,G6,H6)
IF (I6<G6, SUM(C6,D6,E6,F6,G6,H6)
IF (I6<H6, SUM(C6,D6,E6,F6,G6,H6),
IF (I6<0, SUM(C6,D6,E6,F6,G6,H6).

I have applied the following formula, but it does not fulfil all the above conditions:

=IF(F6<27,SUM(C6,D6,E6,G6,H6,I6),IF(G6<27,SUM(C6,D6,E6,F6,H6,I6),IF(H6<27,SUM(C6,D6,E6,F6,G6,I6),IF(I6<0,SUM(C6,D6,E6,F6,G6,H6),IF(I6<F6,SUM(C6,D6,E6,F6,G6,H6),IF(I6<G6,SUM(C6,D6,E6,F6,G6,H6),IF(I6<H6,SUM(C6,D6,E6,F6,G6,H6),"")))))))
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Book1
ABCDEFGHIJK
6A80808080808080480
7B40706050254045305
8C30354026404522212
9D66517147552621311
10E44515261193818264
Sheet1
Cell Formulas
RangeFormula
K6:K10K6=SUM(C6:I6)-IFERROR(INDEX(C6:I6,MATCH(1,--(C6:I6<27),0)),MIN(C6:I6))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Solution
Book1
ABCDEFGHIJK
6A80808080808080480
7B40706050254045305
8C30354026404522212
9D66517147552621311
10E44515261193818264
Sheet1
Cell Formulas
RangeFormula
K6:K10K6=SUM(C6:I6)-IFERROR(INDEX(C6:I6,MATCH(1,--(C6:I6<27),0)),MIN(C6:I6))
Press CTRL+SHIFT+ENTER to enter array formulas.
Dear member, thank you very much.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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