Extreme Excel Help ...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Extreme Excel Help (SUMIF, INDEX, MATCH content)

2 Posts
3 Users
0 Reactions
85 Views
Posts: 0
Free Member
Topic starter
 

Hi,

This one has stumped me. I have some data as follows:

Group Code Aug-11 Sep-11
Total Sales 4 58
Total Sales 5 5
Total Sales 6 3
Total Sales 6 5
Total Sales 3 57
COG 2 8
COG 2 8
COG 1 43
COG 1 3
COG 1 37

... repeating over many months and group codes...

Which I want to display as

Group Code Aug-11
Total Sales 24
COG 7

Which is easy with SUMIF etc, however I want it to be dynamic such that if I change the heading in the display set to say another month, it will pick up that month from the underlying data. For example if I change Aug-11 to Sep-11 I want it to pick up the underlying data correctly

I think I need to be using INDEX or MATCH in conjunction with SUMIF but currently am stuck...

Thanks in advance!


 
Posted : 03/11/2011 10:18 am
Posts: 36
Free Member
 

in XY7:
=SUMIF($A$2:$A$4, $XX7, OFFSET($B$1, 1, MATCH($XX$6,$B$1:$D$1)-1, ROWS($A$2:$A$4), 1))

Where:

$A$2:$A$4 is your left hand column of field names

$XX7 is "Total Sales" or "COG"

$B$1 is just a fixed reference point for the offset calc assuming that your column heading dates start at B1 and go along C1, D1 etc

$XX$6 is a cell in which you change the Month you want the sumif data for

$B$1:$D$1 is your month headings array

$A$2:$A$4 is the total length of your field list down the A column


 
Posted : 03/11/2011 10:28 am
Posts: 19
Free Member
 

wouldn't pivot tables do this for you?


 
Posted : 03/11/2011 10:30 am

6 DAYS LEFT
We are currently at 95% of our target!