Let's find ourselves a trailer and get hitched!
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-02-2007, 18:55
kramarczyk's Avatar
kramarczyk kramarczyk is offline
is getting his kicks.
AKA: Mark Kramarczyk
FRC #3096 (Highlanders)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Sterling Heights, MI
Posts: 602
kramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond repute
Re: Help with VB code

So, what do you want it to do?
  #2   Spotlight this post!  
Unread 01-02-2007, 20:41
Setsanto's Avatar
Setsanto Setsanto is offline
Registered User
FRC #1334 (OTHS RobOTics)
Team Role: Animator
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Oakville, ON (Canada)
Posts: 122
Setsanto is a jewel in the roughSetsanto is a jewel in the roughSetsanto is a jewel in the rough
Send a message via MSN to Setsanto
Re: Help with VB code

I'm trying to get the macro "CopyGame" to copy the RP and QP on the spreadsheet "Scoresheet" to the RP and QP columns on the spreadsheet "QP&RP"
__________________
2008 : GTA Regional 7th Seed, Quarters
2008 : Waterloo Regional 4th Seed, Quarters
2007 : GTA Regional 2nd Seed, Quarters
2007 : Waterloo Regional Quarters
  #3   Spotlight this post!  
Unread 02-02-2007, 14:17
kramarczyk's Avatar
kramarczyk kramarczyk is offline
is getting his kicks.
AKA: Mark Kramarczyk
FRC #3096 (Highlanders)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Sterling Heights, MI
Posts: 602
kramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond repute
Re: Help with VB code

Here's my shot at it...

http://www.chiefdelphi.com/media/papers/1916

I combined the QR&RP sheet and the Seeding sheet into the Match Results Sheet... They are still in the workbook, just hidden to reduce confusion.

The macros are a bit brute force, but they work... nuff said.

Let me know what you think.
  #4   Spotlight this post!  
Unread 02-02-2007, 16:20
Setsanto's Avatar
Setsanto Setsanto is offline
Registered User
FRC #1334 (OTHS RobOTics)
Team Role: Animator
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Oakville, ON (Canada)
Posts: 122
Setsanto is a jewel in the roughSetsanto is a jewel in the roughSetsanto is a jewel in the rough
Send a message via MSN to Setsanto
Re: Help with VB code

Well, it works, which is better than what I did, also, Ranking Points are divided by 3 for their final score, and finally, your IF satements in the totals columns seem kind of pointless, could you please specify what they are for?

~Nick/1334

EDIT: The statement in the last column should actually be
=IF(ISERROR(SUMIF($C$2:$GT$2,"RP",C3:GT3)/(COUNT(C3:GT3)/2)),0,SUMIF($C$2:$GT$2,"RP",C3:GT3)/(COUNT(C3:GT3)/4))/3
__________________
2008 : GTA Regional 7th Seed, Quarters
2008 : Waterloo Regional 4th Seed, Quarters
2007 : GTA Regional 2nd Seed, Quarters
2007 : Waterloo Regional Quarters

Last edited by Setsanto : 02-02-2007 at 16:27.
  #5   Spotlight this post!  
Unread 03-02-2007, 01:15
kramarczyk's Avatar
kramarczyk kramarczyk is offline
is getting his kicks.
AKA: Mark Kramarczyk
FRC #3096 (Highlanders)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Sterling Heights, MI
Posts: 602
kramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond repute
Re: Help with VB code

The IF statements add up the totals of QP and RP's... since I kept with the original format of QP RP QP RP QP RP... I needed a way to seperate them out which is what the countif's do. The QP's just get added up so nothing else is required, but the RP's need to get averaged per section 9.3.8, not divided by 3.
Quote:
The total number of ranking points earned by a team throughout their qualification matches, divided by the number of matches played (excluding any SURROGATE matches), then truncated to two decimal places, will be their ranking score.
Since there is no automated 'average if' function I needed to build it... I used the sumif to add up the RP points and the count to see how many entries there are. However, since the QP and RP are listed in the same row I end up with a count of 6 for 3 matches, hence I divided the count by 2. sumif / count / 2. The ISERROR is just capturing any divide by zero errors that may occur because there are no entries for a team yet. The errors don't cause any harm, but they are ugly.

I'm not sure what the '/4 ' & '/3' tagged on the end of the suggested if statement do. Also, the formula in the iserror segment and the formula in the false section of the if should be the same for the error capturing to work as designed.

I acknowledge that the VB code could be cleaned up and made more elegent, but I was unable to follow the original code due to the lack of comments.

Mark
  #6   Spotlight this post!  
Unread 03-02-2007, 20:21
Setsanto's Avatar
Setsanto Setsanto is offline
Registered User
FRC #1334 (OTHS RobOTics)
Team Role: Animator
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Oakville, ON (Canada)
Posts: 122
Setsanto is a jewel in the roughSetsanto is a jewel in the roughSetsanto is a jewel in the rough
Send a message via MSN to Setsanto
Re: Help with VB code

I wasn't criticizing you at all, I really appreciate all the help that you have given me over the past few days. My comments were merely there because of my own misinterpretation of the rules, and my lack of knowledge in excel/VB. Thanks for theclarification and all your help.

~Nick/1334
__________________
2008 : GTA Regional 7th Seed, Quarters
2008 : Waterloo Regional 4th Seed, Quarters
2007 : GTA Regional 2nd Seed, Quarters
2007 : Waterloo Regional Quarters
  #7   Spotlight this post!  
Unread 04-02-2007, 01:21
kramarczyk's Avatar
kramarczyk kramarczyk is offline
is getting his kicks.
AKA: Mark Kramarczyk
FRC #3096 (Highlanders)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Sterling Heights, MI
Posts: 602
kramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond reputekramarczyk has a reputation beyond repute
Re: Help with VB code

No offense taken, I was just trying to provide a thorough answer.

Hope it works out well for you.

Mark
  #8   Spotlight this post!  
Unread 08-02-2007, 16:04
Setsanto's Avatar
Setsanto Setsanto is offline
Registered User
FRC #1334 (OTHS RobOTics)
Team Role: Animator
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Oakville, ON (Canada)
Posts: 122
Setsanto is a jewel in the roughSetsanto is a jewel in the roughSetsanto is a jewel in the rough
Send a message via MSN to Setsanto
Re: Help with VB code

Thnaks, good luck to your team too.
__________________
2008 : GTA Regional 7th Seed, Quarters
2008 : Waterloo Regional 4th Seed, Quarters
2007 : GTA Regional 2nd Seed, Quarters
2007 : Waterloo Regional Quarters
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with code b-rant Programming 1 05-04-2006 13:52
Need help with code CaseyKasem_1251 Programming 3 18-02-2006 09:39
Need help with code. hawk_11 Programming 6 06-02-2005 13:56
Need help with my code jaywion Programming 9 20-03-2004 11:32
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46


All times are GMT -5. The time now is 03:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi