horizontal and vertical criteria
DESCRIPTION
Look up Horizontal and Vertical CriteriaTRANSCRIPT
![Page 1: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/1.jpg)
Hi all. I've been trying to figure out a solution for this but can't seem to come up with anything. Below is a shot of my data. It has sites in the first column, Version in the second column and Time frame across the top. On my summary page it lists the sites and I have 2 drop down boxes, one for the Version (WP or Forecast) and another with the timeframe.
What I'm looking for is a formula that will sum the three criteria, Site, Version and Timeframe based on the selection chosen. It's the summing of horizontal and vertical criteria that's messing me up
Any help would be greatly appreciated!!!
Jan Feb Mar Q1
Site 1 WP 188 188 188 565
Site 2 WP 41 41 41 124
Site 3 WP 22 22 22 66
Site 4 WP 178 223 218 618
Site 5 WP 14 14 14 41
Site 6 WP 153 177 182 512
Site 7 WP 596 666 665 1,927
Site 1 Forecast 150 140 182 472
Site 2 Forecast 15 14 26 55
Site 3 Forecast 15 39 45 99
Site 4 Forecast 91 124 178 393
Site 5 Forecast 26 16 60 102
Site 6 Forecast 150 138 204 492
Site 7 Forecast 21 8 7 36
![Page 2: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/2.jpg)
Default Re: Sum Multiple Criteria horizontal and vertical
This formula should get you started
=SUMPRODUCT((--$A$1:$A$15="Site 1"),--($B$1:$B$15="WP"),--($F$1:$F$15))
Share
Darn. I hadn't thought of that.
Reply With Quote Reply With Quote
Jul 18th, 2011, 10:54 AM #3
T. Valko T. Valko is offline
Board Regular
T. Valko's Avatar Join Date
May 2009
Location
Pittsburgh
Posts
16,133
Default Re: Sum Multiple Criteria horizontal and vertical
Quote Originally Posted by aja4481 View Post
Hi all. I've been trying to figure out a solution for this but can't seem to come up with anything. Below is a shot of my data. It has sites in the first column, Version in the second column and Time frame across the top. On my summary page it lists the sites and I have 2 drop down boxes, one for the Version (WP or Forecast) and another with the timeframe.
What I'm looking for is a formula that will sum the three criteria, Site, Version and Timeframe based on the selection chosen. It's the summing of horizontal and vertical criteria that's messing me up
Any help would be greatly appreciated!!!
![Page 3: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/3.jpg)
Jan Feb Mar Q1
Site 1 WP 188 188 188 565
Site 2 WP 41 41 41 124
Site 3 WP 22 22 22 66
Site 4 WP 178 223 218 618
Site 5 WP 14 14 14 41
Site 6 WP 153 177 182 512
Site 7 WP 596 666 665 1,927
Site 1 Forecast 150 140 182 472
Site 2 Forecast 15 14 26 55
Site 3 Forecast 15 39 45 99
Site 4 Forecast 91 124 178 393
Site 5 Forecast 26 16 60 102
Site 6 Forecast 150 138 204 492
Site 7 Forecast 21 8 7 36
What version of Excel are you using?
Share
.
Biff
Microsoft MVP - Excel
Using Excel 2002, 2007
![Page 4: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/4.jpg)
KISS - Keep It Simple Stupid
Reply With Quote Reply With Quote
Jul 18th, 2011, 11:03 AM #4
Yahya Yahya is offline
Board Regular
Join Date
Mar 2009
Location
�Amman Jordan
Posts
644
Default Re: Sum Multiple Criteria horizontal and vertical
i hope this way is what you want
Sheet1
A B C D E F G H I
1 Jan Feb Mar Q1
2 Site 1 WP 188 188 188 565
3 Site 2 WP 41 41 41 124
4 Site 3 WP 22 22 22 66
5 Site 4 WP 178 223 218 618 188
6 Site 5 WP 14 14 14 41
7 Site 6 WP 153 177 182 512
8 Site 7 WP 596 666 665 1,927
9
10 Site 1 Forecast 150 140 182 472
![Page 5: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/5.jpg)
11 Site 2 Forecast 15 14 26 55
12 Site 3 Forecast 15 39 45 99
13 Site 4 Forecast 91 124 178 393
14 Site 5 Forecast 26 16 60 102
15 Site 6 Forecast 150 138 204 492
16 Site 7 Forecast 21 8 7 36
Excel 2007
Worksheet Formulas
Cell Formula
I5 =SUMPRODUCT(($A$2:$A$16="Site 1")*($B$2:$B$16="WP")*($C$1:$F$1="Feb")*$C$2:$F$16)
Share
Yahya Hussien
Reply With Quote Reply With Quote
Jul 18th, 2011, 01:34 PM #5
aja4481 aja4481 is offline
New Member
Join Date
Mar 2011
Posts
26
Default Re: Sum Multiple Criteria horizontal and vertical
thanks all. I shuold have mentioned that I'm using 2003 and don't have a sumifs function
Share
![Page 6: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/6.jpg)
Reply With Quote Reply With Quote
Jul 18th, 2011, 01:38 PM #6
aja4481 aja4481 is offline
New Member
Join Date
Mar 2011
Posts
26
Default Re: Sum Multiple Criteria horizontal and vertical
That worked awsome. Thank you so much!!!!!!!
Share
Reply With Quote Reply With Quote
Jul 18th, 2011, 02:06 PM #7
T. Valko T. Valko is offline
Board Regular
T. Valko's Avatar Join Date
May 2009
Location
Pittsburgh
Posts
16,133
Default Re: Sum Multiple Criteria horizontal and vertical
Quote Originally Posted by aja4481 View Post
thanks all. I shuold have mentioned that I'm using 2003 and don't have a sumifs function
Here's another one...
![Page 7: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/7.jpg)
Sheet1
A B C D E F
1 _ _ Jan Feb Mar Q1
2 Site 1 WP 188 188 188 565
3 Site 2 WP 41 41 41 124
4 Site 3 WP 22 22 22 66
5 Site 4 WP 178 223 218 618
6 Site 5 WP 14 14 14 41
7 Site 6 WP 153 177 182 512
8 Site 7 WP 596 666 665 1,927
9 _ _ _ _ _ _
10 Site 1 Forecast 150 140 182 472
11 Site 2 Forecast 15 14 26 55
12 Site 3 Forecast 15 39 45 99
13 Site 4 Forecast 91 124 178 393
14 Site 5 Forecast 26 16 60 102
15 Site 6 Forecast 150 138 204 492
16 Site 7 Forecast 21 8 7 36
Lookup criteria:
A20 = Site 2
![Page 8: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/8.jpg)
B20 = Forecast
C20 = Feb
=SUMPRODUCT(--(A2:A16=A20),--(B2:B16=B20),INDEX(C2:F16,,MATCH(C20,C1:F1,0)))
Share
.
Biff
Microsoft MVP - Excel
Using Excel 2002, 2007
KISS - Keep It Simple Stupid
Reply With Quote Reply With Quote
Jul 18th, 2011, 04:49 PM #8
aja4481 aja4481 is offline
New Member
Join Date
Mar 2011
Posts
26
Default Re: Sum Multiple Criteria horizontal and vertical
Thanks all. Works great! But just to be more complicated, does anyone know how I could add a Year to Date sum condition? I've done the below in the past but never with the multiple conditions
=SUMPRODUCT(--(MONTH('Sheet1!$B$1:$P$1)<=MONTH($L$2)),'CPU sheet1'!$E$47:$P$47)/$L$3
with L2 as the month name and L3 as the month number
Share
![Page 9: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/9.jpg)
Reply With Quote Reply With Quote
Jul 18th, 2011, 05:40 PM #9
T. Valko T. Valko is offline
Board Regular
T. Valko's Avatar Join Date
May 2009
Location
Pittsburgh
Posts
16,133
Default Re: Sum Multiple Criteria horizontal and vertical
Quote Originally Posted by aja4481 View Post
Thanks all. Works great! But just to be more complicated, does anyone know how I could add a Year to Date sum condition? I've done the below in the past but never with the multiple conditions
=SUMPRODUCT(--(MONTH('Sheet1!$B$1:$P$1)<=MONTH($L$2)),'CPU sheet1'!$E$47:$P$47)/$L$3
with L2 as the month name and L3 as the month number
A couple of questions...
Is the combination of site + version always unqiue? For example, will you ever have duplicates like ths:
Sheet1
A B C D E F
1 _ _ Jan Feb Mar Q1
![Page 10: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/10.jpg)
2 Site 1 WP 188 188 188 565
3 Site 2 WP 41 41 41 124
4 Site 3 WP 22 22 22 66
5 Site 4 WP 178 223 218 618
6 Site 5 WP 14 14 14 41
7 Site 5 WP 153 177 182 512
8 Site 5 WP 596 666 665 1,927
9 _ _ _ _ _ _
10 Site 1 Forecast 150 140 182 472
11 Site 2 Forecast 15 14 26 55
12 Site 2 Forecast 15 39 45 99
13 Site 4 Forecast 91 124 178 393
14 Site 5 Forecast 26 16 60 102
15 Site 6 Forecast 150 138 204 492
16 Site 7 Forecast 21 8 7 36
Also, if you want a YTD then months in the future should have no data, correct? For example, if this is July then you won't have any data for August, September, October, November and December, right?
Share
.
Biff
Microsoft MVP - Excel
Using Excel 2002, 2007
![Page 11: Horizontal and Vertical Criteria](https://reader036.vdocuments.net/reader036/viewer/2022082710/55cf9867550346d033976fea/html5/thumbnails/11.jpg)
KISS - Keep It Simple Stupid
Reply With Quote Reply With Quote
Jul 18th, 2011, 06:45 PM #10
aja4481 aja4481 is offline
New Member
Join Date
Mar 2011
Posts
26
Default Re: Sum Multiple Criteria horizontal and vertical
good questions. Yes, site + version will always be uniquie. unfortunatly months in YTD may not be blank. for example I have a data sheet that has my 2011 budget by month for every month in the year. I have the actuals posting at the end of each month.
But I may also run into a situation where someone wants to pull Year to Date May despite being in July.
It's a tough one. The formula I put up before works but it's simple in that it only reads one line of data and only has the one criteria of the date.
So I tried the below formula but it's just returning the value for "Site 4", "Forecast" & "Feb", which is 124. Not the 91 + 124.
=SUMPRODUCT(($A$2:$A$16="Site 4")*($B$2:$B$16="Forecast")*($C$1:$F$1<="Feb")*$C$2:$F$16)