R
Robert Crandal
I have a spreadsheet full of NFL game predictions this week. Here is
a quick abbreviated sample of my table:
(Actual table has 207 rows, 17 columns)
Name B C D E F Q
--------------------------------- ...... -----
Tom Mia SF Car Hou Phi ...... Dal
David Mia SF NO Hou Was ...... NYG
Barbara Mia Ram NO Hou Phi ......NYG
....
Sara NYJ SF NO Ten Phi ...... Dal (row 207)
(The important data that I need to analyze is within the range B1:Q207)
Here is a list of the game matchups (or string values) for
each column:
Col B - Mia or NYJ Col J - NE or Buf
Col C - SF or Ram Col K - AZ or Sea
Col D - NO or Car Col L - Oak or SD
Col E - Hou or Ten Col M - KC or Den
Col F - Phi or Was Col N - Atl or TB
Col G - GB or Det Col O - Bal or Cin
Col H - Min or Chi Col P - Cle or Pit
Col I - Jac or Ind Col Q - NYG or Dal
If I were to create a list of game winners in a list variable
(or similar data type), what is the best way to search the data
table range (B1:207) to find which row has the most winning
matches?
For example, suppose the following teams win tomorrow:
"Mia, Ram, Car, Ten, Was, Det, Min, Ind, Buf, AZ, Oak, KC, TB, Cin, Cle,
NYG"
Now I need to search the data table for which row has the most matches to
this data.
What is the best way to do this in VBA?
a quick abbreviated sample of my table:
(Actual table has 207 rows, 17 columns)
Name B C D E F Q
--------------------------------- ...... -----
Tom Mia SF Car Hou Phi ...... Dal
David Mia SF NO Hou Was ...... NYG
Barbara Mia Ram NO Hou Phi ......NYG
....
Sara NYJ SF NO Ten Phi ...... Dal (row 207)
(The important data that I need to analyze is within the range B1:Q207)
Here is a list of the game matchups (or string values) for
each column:
Col B - Mia or NYJ Col J - NE or Buf
Col C - SF or Ram Col K - AZ or Sea
Col D - NO or Car Col L - Oak or SD
Col E - Hou or Ten Col M - KC or Den
Col F - Phi or Was Col N - Atl or TB
Col G - GB or Det Col O - Bal or Cin
Col H - Min or Chi Col P - Cle or Pit
Col I - Jac or Ind Col Q - NYG or Dal
If I were to create a list of game winners in a list variable
(or similar data type), what is the best way to search the data
table range (B1:207) to find which row has the most winning
matches?
For example, suppose the following teams win tomorrow:
"Mia, Ram, Car, Ten, Was, Det, Min, Ind, Buf, AZ, Oak, KC, TB, Cin, Cle,
NYG"
Now I need to search the data table for which row has the most matches to
this data.
What is the best way to do this in VBA?