Sum If formula using cell row/column references

fraz627

Board Regular
Joined
Apr 26, 2014
Messages
110
Office Version
  1. 2010
Platform
  1. Windows
example.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACAD
1
2
3
4
5LVLCNTDESCRIPTIONTOTALSExample place the total in Cell N6 based on if the value of A6 = 0 The SUM if for the Next 5 rows( N7-N11 the size of the range is determined by the value of B6 I feelthat I would need to be able to reference using an activecell.row, column type of reference.
605Task one main
710tast one sub item two1
812tast one sub item three2
920aaaa3
1020ccccc4
1110tast one sub item four5
1205task two nain
1310tast otwo sub item two5
1412tast two sub item three10
1520aaaa15
1620bbbb20
1710tast two sub item four25
1806task three main
1912tast threesub item one10
2020aaaa20
2120bbbb30
2210tast three sub item two40
2310tast three sub item three50
2410tast three sub item four60
25
EXAMPLE_SHEET

I'm attaching a sample workbook to explain what I'm looking to accomplish.

In short I need to sum a range based on a value of another column. and if another column is equal to a value.

note all of the values will change as the data changes.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try this:

Dante Amor
ABCDEFGHIJKLMN
1
2
3
4
5LVLCNTDESCRIPTIONTOTALS
605Task one main15
710tast one sub item two1
812tast one sub item three2
920aaaa3
1020ccccc4
1110tast one sub item four5
1205task two nain75
1310tast otwo sub item two5
1412tast two sub item three10
1520aaaa15
1620bbbb20
1710tast two sub item four25
1806task three main210
1912tast threesub item one10
2020aaaa20
2120bbbb30
2210tast three sub item two40
2310tast three sub item three50
2410tast three sub item four60
Sheet 2
Cell Formulas
RangeFormula
N6,N18,N12N6=IF(A6=0,SUM(INDEX(OFFSET(N7,0,0,B6),0)),"")
 
Upvote 0
Solution
Try this:

Dante Amor
ABCDEFGHIJKLMN
1
2
3
4
5LVLCNTDESCRIPTIONTOTALS
605Task one main15
710tast one sub item two1
812tast one sub item three2
920aaaa3
1020ccccc4
1110tast one sub item four5
1205task two nain75
1310tast otwo sub item two5
1412tast two sub item three10
1520aaaa15
1620bbbb20
1710tast two sub item four25
1806task three main210
1912tast threesub item one10
2020aaaa20
2120bbbb30
2210tast three sub item two40
2310tast three sub item three50
2410tast three sub item four60
Sheet 2
Cell Formulas
RangeFormula
N6,N18,N12N6=IF(A6=0,SUM(INDEX(OFFSET(N7,0,0,B6),0)),"")

Thanks that should do it, now to sit down and try to learn how it works. Thanks again
 
Upvote 0
Thanks that should do it, now to sit down and try to learn how it works. Thanks again
One more question how would I total those three ranges? be aware the number of ranges will change
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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