|
|
|
| You've downloaded my heart. |
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Help with VB code
Basically for my team's scouting database I'm writing a scoring thing. Recently I had to make some changes to the number of spreadsheets, what information is on each one, etc. to fit what my team wanted. I thought I had changed everything correctly, bu it turns out I haven't and its not working. This is a link to the CD-Media page its on: http://www.chiefdelphi.com/media/papers/1914
If anyone can offer any help, it would be much appreciated. ~Nick/1334 |
|
#2
|
||||
|
||||
|
Re: Help with VB code
So, what do you want it to do?
|
|
#3
|
||||
|
||||
|
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"
|
|
#4
|
||||
|
||||
|
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. |
|
#5
|
||||
|
||||
|
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 Last edited by Setsanto : 02-02-2007 at 16:27. |
|
#6
|
||||
|
||||
|
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:
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 |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
||||
|
||||
|
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 |
|
#9
|
||||
|
||||
|
Re: Help with VB code
Thnaks, good luck to your team too.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |