I have this table below wherein I would like to get the data below
Note that number of Participants differ from time to time. Would like to get the data in between Participants and Finishing Position,
Winner E/W 1/5 Top 6 and Finishing Position, Top 20 and Finishing Position, Top 10 and Finishing Position.
Regards,
Cecille Layog
Note that number of Participants differ from time to time. Would like to get the data in between Participants and Finishing Position,
Winner E/W 1/5 Top 6 and Finishing Position, Top 20 and Finishing Position, Top 10 and Finishing Position.
Test Golf.xlsx | |||
---|---|---|---|
A | |||
1 | Participants | ||
2 | Simpson, Webb | ||
3 | Koepka, Brooks | ||
4 | Casey, Paul | ||
5 | Reed, Patrick | ||
6 | Fleetwood, Tommy | ||
7 | Rose, Justin | ||
8 | English, Harris | ||
9 | Griffin, Lanto | ||
10 | Taylor, Vaughn | ||
11 | Finishing Position | ||
12 | 2221297128 | ||
13 | Opens | ||
14 | |||
15 | 200810 1457 | ||
16 | Winner E/W 1/5 Top 6 | ||
17 | Total | ||
18 | WG | ||
19 | Tot EW | ||
20 | WG EW | ||
21 | |||
22 | 1100 | ||
23 | -22,749 | ||
24 | -786 | ||
25 | -1,372 | ||
26 | -165 | ||
27 | |||
28 | 1200 | ||
29 | 18,308 | ||
30 | 911 | ||
31 | 1,375 | ||
32 | 88 | ||
33 | |||
34 | 1700 | ||
35 | 16,740 | ||
36 | 911 | ||
37 | 1,221 | ||
38 | 88 | ||
39 | |||
40 | 1700 | ||
41 | 11,102 | ||
42 | 652 | ||
43 | -248 | ||
44 | 31 | ||
45 | |||
46 | 1900 | ||
47 | 13,515 | ||
48 | 911 | ||
49 | 408 | ||
50 | 88 | ||
51 | Finishing Position | ||
52 | 2221297511 | ||
53 | Opens | ||
54 | |||
55 | 200810 1457 | ||
56 | Closes | ||
57 | |||
58 | 200813 1300 | ||
59 | Settles | ||
60 | |||
61 | 200816 2300 | ||
62 | NGL | ||
63 | |||
64 | 2000 | ||
65 | 77.3 % | ||
66 | HIDE | ||
67 | SUSPEND | ||
68 | Leader after round 1 E/W 1/5 Top 6 | ||
69 | edit | ||
70 | more_vert | ||
71 | Top 10 | ||
72 | Total | ||
73 | WG | ||
74 | |||
75 | 260 | ||
76 | -19,511 | ||
77 | -267 | ||
78 | |||
79 | 263 | ||
80 | -1,497 | ||
81 | 295 | ||
82 | |||
83 | 300 | ||
84 | 519 | ||
85 | 295 | ||
86 | |||
87 | 300 | ||
88 | 852 | ||
89 | 295 | ||
90 | |||
91 | 350 | ||
92 | 116 | ||
93 | 166 | ||
94 | Finishing Position | ||
95 | 2221297530 | ||
96 | Opens | ||
97 | |||
98 | 200810 1457 | ||
99 | Closes | ||
100 | more_vert | ||
101 | Top 20 | ||
102 | Total | ||
103 | WG | ||
104 | Tot EW | ||
105 | WG EW | ||
106 | |||
107 | 2600 | ||
108 | -36,981 | ||
109 | 198 | ||
110 | 130 | ||
111 | 29 | ||
112 | |||
113 | 2900 | ||
114 | -25,372 | ||
115 | 198 | ||
116 | -36 | ||
117 | 29 | ||
118 | |||
119 | 3400 | ||
120 | -6,937 | ||
121 | 198 | ||
122 | -88 | ||
123 | 29 | ||
124 | |||
125 | 3400 | ||
126 | 172 | ||
127 | 198 | ||
128 | 171 | ||
129 | 29 | ||
130 | |||
131 | 4100 | ||
132 | -31,270 | ||
133 | 198 | ||
134 | -193 | ||
135 | 29 | ||
136 | Finishing Position | ||
137 | 2221297508 | ||
138 | Opens | ||
139 | |||
140 | 200810 1457 | ||
141 | Closes | ||
142 | |||
143 | 200813 1300 | ||
144 | Settles | ||
145 | Top 10 | ||
146 | Total | ||
147 | WG | ||
148 | Tot EW | ||
149 | WG EW | ||
150 | |||
151 | 500 | ||
152 | -36,981 | ||
153 | 198 | ||
154 | 130 | ||
155 | 29 | ||
156 | |||
157 | 324 | ||
158 | -25,372 | ||
159 | 198 | ||
160 | -36 | ||
161 | 29 | ||
162 | |||
163 | 567 | ||
164 | -6,937 | ||
165 | 198 | ||
166 | -88 | ||
167 | 29 | ||
168 | |||
169 | 4577 | ||
170 | 172 | ||
171 | 198 | ||
172 | 171 | ||
173 | 29 | ||
174 | |||
175 | 475 | ||
176 | -31,270 | ||
177 | 198 | ||
178 | -193 | ||
179 | 29 | ||
180 | Finishing Position | ||
181 | 2221297508 | ||
182 | Opens | ||
183 | |||
184 | 200810 1457 | ||
185 | Closes | ||
186 | |||
187 | 200813 1300 | ||
188 | Settles | ||
Paste Here |
Test Golf.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Participants | Participants | Winner E/W 1/5 Top 6 | Leader after round 1 E/W 1/5 Top 6 | Top 20 | |||
2 | Thomas, Webb | Simpson, Webb | 1100 | 260 | 2600 | |||
3 | Alyssa, Brooks | Koepka, Brooks | 1200 | 263 | 2900 | |||
4 | Jaime, Paul | Casey, Paul | 1700 | 300 | 3400 | |||
5 | James, Patrick | Reed, Patrick | 1700 | 300 | 3400 | |||
6 | Foldwood, Tommy | Fleetwood, Tommy | 1900 | 350 | 4100 | |||
7 | Winner E/W 1/5 Top 6 | |||||||
8 | 1100 | |||||||
9 | 1200 | |||||||
10 | 1700 | |||||||
11 | 1700 | |||||||
12 | 1900 | |||||||
13 | Leader after round 1 E/W 1/5 Top 6 | |||||||
14 | 260 | |||||||
15 | 263 | |||||||
16 | 300 | |||||||
17 | 300 | |||||||
18 | 350 | |||||||
19 | Top 20 | |||||||
20 | 2600 | |||||||
21 | 2900 | |||||||
22 | 3400 | |||||||
23 | 3400 | |||||||
24 | 4100 | |||||||
25 | Top 5 | |||||||
26 | 500 | |||||||
27 | 324 | |||||||
28 | 567 | |||||||
29 | 4577 | |||||||
30 | 475 | |||||||
Result |
VBA Code:
Sub Find_Data()
Dim a As Range, b As Variant
Dim sh1 As Worksheet, bStart As Boolean
Dim lr As Long, j As Long, k As Long, m As Long
Set sh1 = Sheets("Paste Here")
lr = sh1.Range("A" & Rows.Count).End(3).Row
ReDim b(1 To lr, 1 To 3)
For Each a In sh1.Range("A1:A" & lr).SpecialCells(xlCellTypeConstants).Areas
Select Case LCase(a.Cells(1))
Case LCase("Winner E/W 1/5 Top 6"), LCase("Leader after round 1 E/W 1/5 Top 6")
bStart = True
j = 0
If LCase(a.Cells(1)) = LCase("Winner E/W 1/5 Top 6") Then k = 2 Else k = 3
Case LCase("Leader After Round 1")
bStart = False
End Select
If bStart Then
If LCase("Winner E/W 1/5 Top 6") <> LCase(a.Cells(1)) And LCase("Leader after round 1 E/W 1/5 Top 6") <> LCase(a.Cells(1)) Then
m = m + 1
b(m, 1) = a.Cells(1).Value
End If
j = j + 1
b(j, k) = a.Cells(1).Value
End If
Next
Sheets("Result").Range("A1").Resize(m, 3).Value = b
End Sub
Regards,
Cecille Layog
Last edited by a moderator: