Solved

Count Wins-Losses versus specific team

Posted on 2014-09-18
10
144 Views
Last Modified: 2014-09-19
The attached Excel File contains team stats for specific Teams.

I'd like to be able to type a team in D1, G1, J1 and M1 and automatically calculate the number of wins losses for that team only.

For instance, If 'TOR' is typed in D1 then

B1 should contain all the times BAL (B4) won versus TOR (D1) While Cell
C1 should contain all the times BAL (B4) lost versus TOR (D1).

Ditto for the rest of the teams.

The Data in rows 3 and 4 calculate based on specific cell ranges.

Keep in mind that team data can be updated to include more data on the bottom most cells.
EE-Wins-LossesVsTeam.xlsx
0
Comment
Question by:Pedrov664
  • 5
  • 3
  • 2
10 Comments
 

Author Comment

by:Pedrov664
ID: 40330541
oooops!

The above should read...

 The Data in rows 3 and 5 calculate based on specific cell ranges.
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40330564
Please find attached.
EE-Wins-LossesVsTeam.xlsx
0
 

Author Comment

by:Pedrov664
ID: 40330833
Phillip,

I am running into some issues with the formula you have in the worksheet.

For formula first reads,

{=SUM(IF(D2:D9999<>D1,0,IF(B2:B9999>C2:C9999,1,0)))}

Then when I click in the cell the formula changes to ...

=SUM(IF(D2:D9999<>D1,0,IF(B2:B9999>C2:C9999,1,0)))

It looks like the outerbrakets are removed, so I put them back in and the formula seems to work.

However, When I copy it to another workbook and change the respective cells, it does not work for me.
Instead of a number I see the actual formula in the cell.

{=SUM(IF(D7:D10005<>D6,0,IF(B7:B10005>C7:C10005,1,0)))}

It looks the same except for cell changes due to variations in data locations on a different workbook.

Please help!
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40330836
It's called an array formula.

You don't type the {} (curly brackets).

Instead, if you edit it, instead of pressing Enter to exit, you press Ctrl+Shift+Enter.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40330888
You can use a modified version of your full season SUMPRODUCT formula in row 5 to show these results:

B1:  =SUMPRODUCT(--(B6:B227>C6:C227),--(D6:D227=$D$1))
C1:  =SUMPRODUCT(--(B6:B227<C6:C227),--(D6:D227=$D$1))
E1:  =SUMPRODUCT(--(E6:E227>F6:F227),--(G6:G227=$G$1))
F1:  =SUMPRODUCT(--(E6:E227<F6:F227),--(G6:G227=$G$1))

and similarly for the remaining cells in H, I, J, K

Sample file attached.

Regards,
-Glenn
EE-Wins-LossesVsTeam2.xlsx
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40330896
PS... My Houston Astros didn't do too bad against the teams listed here, at least on the AL side (11-11).
0
 

Author Comment

by:Pedrov664
ID: 40333063
Glen,

you got it!

B1:  =SUMPRODUCT(--(B6:B227>C6:C227),--(D6:D227=D1))
C1:  =SUMPRODUCT(--(B6:B227<C6:C227),--(D6:D227=D1))

etc, etc.
 
I altered your formula a bit in order to be able to copy across (i.e. removing the '$'). I like simple.
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40333415
Glad I was able to help.  I used absolute referencing for the first two example pairs just to keep things straight, but as long as it works, cool.

Regards,
-Glenn
0
 

Author Comment

by:Pedrov664
ID: 40333765
Glen,

Thank you again.

P.S. I would also like the do the same using a table.

See below for link

http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_28522133.html
0
 

Author Closing Comment

by:Pedrov664
ID: 40333766
Excellent Job!

Thanks Again!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ifna and iferror 1 32
Hlookup formula help 14 19
Formula or Macro to determine variance 17 75
Access Excel export not behaving 2 24
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now