SUMIF & MATCH

Houscoogs

New Member
Joined
Aug 19, 2005
Messages
15
I've tried to do a SUMIF and Match function in a cell and can't seem to get it to work. It appears that the SUMIF function is suming up a column and I wanted for it to sum based on a Cell that reflects column headers. For example, I want to perform a SUMIF function base on my month selection (January or February, etc.). Please advice.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
This is just a guess based on your explanation,

=SUMPRODUCT((A1:L1=X1)*(A2:L100))

Where X1 houses a criteria, A1:L1 column headings.
 

Houscoogs

New Member
Joined
Aug 19, 2005
Messages
15
Thanks for the reply. What I wanted to do is to use the SUMIF function to sum from another spreadsheet but I don't want to type in the Column (i.e $F). I wanted to have the flexibility by typing in the match function to lookup based on the column name range.
 

Houscoogs

New Member
Joined
Aug 19, 2005
Messages
15
here's an example:

Data Sheet:

Jan Feb Mar

A 5 6 4
B 7 2 9
A 8 4 7
C 6 5 5
B 7 4 2


Summary Sheet:

Select Month (B1): (Drop Down Box)

A: Return Data Based on===> "Sumif(A1:D7,A1,Match(B1,Month,0))


Expected Result based on select month: Jan = 13; Feb = 10; Mar = 11.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
here's an example:

Data Sheet:

Jan Feb Mar

A 5 6 4
B 7 2 9
A 8 4 7
C 6 5 5
B 7 4 2


Summary Sheet:

Select Month (B1): (Drop Down Box)

A: Return Data Based on===> "Sumif(A1:D7,A1,Match(B1,Month,0))


Expected Result based on select month: Jan = 13; Feb = 10; Mar = 11.

A SumProduct formula would also the job, but not needed here...
Book7
ABCDEFGHI
1JanFebMarJanMar
2A564A1311
3B729B1411
4A847
5C655
6B742
7
Sheet1


H2, copied across and down:

=SUMIF(Sheet1!$A$2:$A$6,$G2,INDEX(Sheet1!$B$2:$D$6,0,MATCH(H$1,Sheet1!$B$1:$D$1,0)))
 

Forum statistics

Threads
1,176,227
Messages
5,902,033
Members
434,935
Latest member
jayrock1987

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
Top