-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyDirPoiData.txt
48 lines (41 loc) · 1.47 KB
/
copyDirPoiData.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Sub copyDirPoiData(cb As Workbook, studiesIndex As Integer, studies As Variant)
Dim j As Integer
j = 1
Dim b As Integer
b = 1
Do While IsNumeric(Workbooks(studies(studiesIndex)).Worksheets("PoiDetails").Cells(b + 2, 2))
b = b + 1
Loop
Do While j <= 4
Dim size As Integer
Dim val(1 To 13) As Double
Dim sd(1 To 13) As Double
Dim i As Integer
i = 1
'Dim name() As String'
Do While Len(Workbooks(studies(studiesIndex)).Worksheets("PoiSummary").Cells(15 * i - 11, 6 * j - 1)) > 0
Debug.Print (i)
Debug.Print (j)
val(i) = Workbooks(studies(studiesIndex)).Worksheets("PoiSummary").Cells(15 * i - 11, 6 * j - 1)
sd(i) = Workbooks(studies(studiesIndex)).Worksheets("PoiSummary").Cells(15 * i - 10, 6 * j - 1)
i = i + 1
Loop
size = i - 1
Dim m As Integer
For m = 1 To size
cb.Worksheets("PoiSummary").Cells(m + 3 + 8 * (studiesIndex - 1), 14) = size
Next m
Dim n As Integer
For n = 1 To size
cb.Worksheets("PoiSummary").Cells(n + 3 + 8 * (studiesIndex - 1), 2 * j + 13) = val(n)
cb.Worksheets("PoiSummary").Cells(n + 3 + 8 * (studiesIndex - 1), 2 * j + 13).NumberFormat = "0.00"
cb.Worksheets("PoiSummary").Cells(n + 3 + 8 * (studiesIndex - 1), 2 * j + 14) = sd(n)
cb.Worksheets("PoiSummary").Cells(n + 3 + 8 * (studiesIndex - 1), 2 * j + 14).NumberFormat = "0.00"
Next n
j = j + 1
Loop
Dim z As Integer
For z = 1 To size
cb.Worksheets("PoiSummary").Cells(z + 3 + 8 * (studiesIndex - 1), 14) = b - 2
Next z
End Sub