Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default If AND for large range of data

I am trying to create a standings sheet based on scores of games. I have a
new worksheet and I am pulling the scores from another worksheet. What I am
trying to do is for a specific team is to find them in a list of games and
then look at the score and determine if they won or lost. If they one then I
would add one to the wins column. However, I cannot seem to figue it out
without some insanely large formula(which excel tells me is too big). Thanks
for any help.

Here is the code I was using =If(AND('sheet1'!A1='sheet2'!A1,
SUM('sheet1'!B1-'sheet1'!D1)1),1,0,+If(AND('sheet1'!A2='sheet2'!A 1,
SUM('sheet1'!B2-'sheet1'!D2)1),1,0,+ etc...

Worksheet 1 (Scores)
A B C D E
H team goals blank goals A Team
1 My team 5 3 Your Team
2 His Team 3 1 Her Team
3 Our Team 1 0 My Team

30 rows

Worksheet 2 (results)
A B C D E
F G
Team Wins Losses Ties Goals For Goals
Against Diff.
1 My Team
2 Your Team
3 His Team
4 Her Team
5 Our Team


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default If AND for large range of data


Try using a SUMPRODUCT formula to check all the rows at once, i.e.

=SUMPRODUCT(('Sheet1'!A$1:A$30=A1)*('Sheet1'!B$1:B $30'Sheet1'!D$1:D$30))

That would count the home wins

If you need to count both home and away then add another SUMPRODUCT,
i.e.

=SUMPRODUCT(('Sheet1'!A$1:A$30=A1)*('Sheet1'!B$1:B $30'Sheet1'!D$1:D$30))+SUMPRODUCT(('Sheet1'!E$1:E $30=A1)*('Sheet1'!B$1:B$30<'Sheet1'!D$1:D$30))

regards, barry


--
barry houdini
------------------------------------------------------------------------
barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=145332

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to optimize? large non-contig cell range for data validation l ker_01 Excel Discussion (Misc queries) 5 May 1st 09 11:05 AM
Excel 2007 hangs on any change to large range of data shoemaven Excel Discussion (Misc queries) 3 November 9th 07 08:57 PM
Graph with large data range (hash marks on axis) cebceb122 Excel Discussion (Misc queries) 1 January 10th 07 01:47 AM
Minimize range on vertical axis with large data gaps Molly Charts and Charting in Excel 1 July 7th 06 02:56 PM
Ploting data with a large range including negative numbers Hoochi Coochi Man Charts and Charting in Excel 1 April 28th 05 03:18 PM


All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"