Sumifs or index match

N0t Y0urs

Board Regular
Joined
May 1, 2022
Messages
96
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
Platform
  1. MacOS
  2. Mobile
  3. Web
Hi all

I have 15 columns of data with 25 rows each. The columns are broken into sets of 3 therefore giving me 5 different groups. These are number 1 - 5, while my rows are numbered 5, 10, … 500, and my columns are labelled FWD, DB and RB

Each group have the same columns but the values are different so what I want to do and get confused is the following:

If my criteria is 3 and 200 I would like to calculate the sum of FWD for the first 3 groups from the first row to the row labelled 200. It would be the same formula for the DB columns but for the RB column it would just be the sum of that column on row labelled 200.

I can get it to work for just one column but when I add the groups in I get confused.

This is what I currently have:

This is for my FWD and DB columns:
=INDEX($D$9:$D$27,MATCH($C$59,$B$9:$B$27))

Where D is group 1 DB, C is my second criteria and B is the row value that criteria is looking for

Then for the FWD column it’s the same only D becomes C

Then my RB column formula is:
=INDEX($E$9:$E$27,MATCH($C$59,$B$9:$B$27))

RB is column E.

So my sheet has these columns:

FWD: C, G, K, O and S
DB: D, H, L, P and T
RB: E, I, M, Q and U

Hope that makes sense as my working file is large. I’m working with 365 and Google sheets.

Thanks in advance
 
Yes that what I want maybe I entered the wrong formula as that’s not what I get but leave it with me.

Thanks again and sorry to be a pain in the butt
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
It works perfectly thanks, it must be me moving it to the position I want and not using eagle eyes.

Thanks again
 
Upvote 0
Sorry I have one more question

How did you know sumproduct was the answer? I worked the solution backwards and understand it but never would have got there and trying to expand my knowledge
 
Upvote 0
How did you know sumproduct was the answer?

SUMIFS requires that the range to be summed and all other criteria be either all horizontal or all vertical and all the same size.

In your case there are two horizontal criteria (Groups and Codes) and one vertical (Row) and the range to be added is a matrix (C3:U27), that's why I used SUMPRODUCT.

M.
 
Upvote 0
For you to better understand when to use SUMIFS.
In the case of Code = RB we just sum the values in one row (in the case 200), so we have:
sum_range = C15:U15
criteria_range1 = C1:U1
criteria_range2 = C2:U2
All horizontal and the same size, so we could have used SUMIFS for Code=RB

M.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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