Summing range of columns in one row based on criteria

rebech

New Member
Joined
Dec 28, 2018
Messages
3
Hello,

I have a large table similar to the one below, with first column as ID numbers. I want to select any row based on the ID number and select only a range of data from that row. For example, I want to be able to select data for ID #3 from March to May, which would be 6. SUMIF didn't work for me. Any help would be appreciated!


Jan Feb March April May
1 5 10 15 20 25
2 4 8 12 16 20
3 2 2 2 2 2
4 6 7 8 9 10
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Sorry bad formatting. Hope this works better..

| Jan Feb March April May
1| 5, 10, 15, 20, 25
2| 4, 8, 12, 16, 20
3| 2, 2, 2, 2, 2
4| 6, 7, 8, 9, 10
 
Upvote 0
Welcome to Mr Excel forum

Maybe...

A
B
C
D
E
F
G
H
I
J
K
1
ID​
Jan​
Feb​
March​
April​
May​
ID​
First​
Last​
Result​
2
1​
5​
10​
15​
20​
25​
3​
March​
May​
6​
3
2​
4​
8​
12​
16​
20​
1​
Feb​
April​
45​
4
3​
2​
2​
2​
2​
2​
4​
Jan​
Feb​
13​
5
4​
6​
7​
8​
9​
10​
6

Criteria in columns H:J

Formula in K2 copied down
=SUM(INDEX(B$2:F$5,MATCH(H2,A$2:A$5,0),MATCH(I2,B$1:F$1,0)):INDEX(B$2:F$5,MATCH(H2,A$2:A$5,0),MATCH(J2,B$1:F$1,0)))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

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