SumIf vertically above cell equals variable value

smiha946

New Member
Joined
Jan 18, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

Is there a way to apply a sumif formula to sum values in a column where the criteria is within the same column:
i.e, per the attached image, to sum the values in yellow. I have manually added in this instance.

Essentially want formula to say, if a cell in column D = my column C value ("New This Month), then sum the value below the match.

Maybe an offset formula within a sum if?

For cell D20, i tried: =sumif(D:D,$c20,offset(D:D,-1,0)) - but this returned an error.

Any ideas apprecaited!
 

Attachments

  • 1674097563572.png
    1674097563572.png
    36 KB · Views: 10

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the MrExcel board!

For the future: MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Try this

23 01 19.xlsm
CD
20a65000
21b10000
22c0
23d2000
24
25
26
27
28a
2910000
30
31
32b
3310000
34
35
36a
3740000
38
39
40a
4115000
42
43
44d
452000
SUMIF
Cell Formulas
RangeFormula
D20:D23D20=SUMIF(D$28:D$44,C20,D$29:D$45)
 
Upvote 1
Welcome to the MrExcel board!

For the future: MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Try this

23 01 19.xlsm
CD
20a65000
21b10000
22c0
23d2000
24
25
26
27
28a
2910000
30
31
32b
3310000
34
35
36a
3740000
38
39
40a
4115000
42
43
44d
452000
SUMIF
Cell Formulas
RangeFormula
D20:D23D20=SUMIF(D$28:D$44,C20,D$29:D$45)
Thanks! This works perfectly.. much simpler solution :)
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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