Sumifs where columns are transposed

drluke

Active Member
Joined
Apr 17, 2014
Messages
284
How can I do a SUMIFS (or similar) where columns/rows are transposed. In my data sheet data is organised like:

3100358725683800
Talent200320124256
Sourcing907785784
Media456930941
Talent42625244256
Sourcing4977485287
Media5693626365

<tbody>
</tbody>

In my 2nd worksheet the columns/rows are transposed but I need to be able to sum the total of 3100 for Sourcing etc.

TalentSourcing
3100
3587

<tbody>
</tbody>

Any advise much appreciated.
 

Excel Facts

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

macattackpro

Board Regular
Joined
Nov 27, 2017
Messages
55
Hello,

Assuming your data is on 'Sheet1' and your product is on 'Sheet2', try this for 'Sourcing' and '3100' (Cell C2):

Code:
{=SUM(IF(Sheet1!$A$2:$A$7=C$1,IF(Sheet1!$B$1:$E$1=$A2,Sheet1!$B$2:$E$7)))}

Note that the formula is entered with CTRL + SHIFT + ENTER to make it an array formula.
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,668
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Assuming your data in Sheet1 A1:E7 (adjust to suit) try something like this

Sheet2

A
B
C
1
Talent​
Sourcing​
2
3100​
626​
587​
3
3587​
345​
151​

Formula in B2 copied across and down
=SUMIF(Sheet1!$A$2:$A$7,B$1,INDEX(Sheet1!$B$2:$E$7,0,MATCH($A2,Sheet1!$B$1:$E$1,0)))

M.
 

oldbrewer

Well-known Member
Joined
Apr 11, 2010
Messages
11,005
col B
col H
code3100code3587code2568code3800
Talent2003201242563100358725683800row 4
Sourcing907785784talent6263451484512
Media456930941sourcing5871511701071
Talent42625244256
Sourcing4977485287very easy to use sumproduct to make the above table
Media5693626365row 9
then use offset match to pull the values into your desired table layout
626 ABOVE obtained by

TalentSourcing=SUMPRODUCT((B4:B9)*($A4:$A9=$H5))
3100626587
3587345151
380045121071626 LEFT obtained by
2568148170=OFFSET($H$4,MATCH(B$13,$H$5:$H$6,0),MATCH($A14,$I$4:$L$4,0))

<colgroup><col><col><col><col><col><col span="10"></colgroup><tbody>
</tbody>
 

Forum statistics

Threads
1,136,780
Messages
5,677,688
Members
419,712
Latest member
LearningCR

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