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.
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
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

ADVERTISEMENT

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,201
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)))
 

Watch MrExcel Video

Forum statistics

Threads
1,114,052
Messages
5,545,735
Members
410,703
Latest member
yaronjoseph
Top