Help with largest values and counts of those values.  
Author Message
JRV2





PostPosted: Visual Basic for Applications (VBA), Help with largest values and counts of those values. Top

Help! Trying to display information from a cross tab query in MS Access. Could only get the correct information displayed by hard coding in the following to view and check every record (250) and display the largest number, how many instances of that number and the days those numbers fall on. Not able to get access to recognize the data object as a value. By hard coding this in, we have run into our limit within access and still need to display more information. Any ideas on how to condense this and still get the information

Private Sub Form_Current()
Exclude = 250
Day_Select = "Day_27"
Update_Screen
Exclude = Value_27
Day_Select = "Day_26"
Update_Screen
Exclude = Value_26
Day_Select = "Day_25"
Update_Screen
Exclude = Value_25
Day_Select = "Day_24"
Update_Screen
Exclude = Value_24
Day_Select = "Day_23"
Update_Screen
Exclude = Value_23
Day_Select = "Day_22"
Update_Screen
Exclude = Value_22
Day_Select = "Day_21"
Update_Screen
Exclude = Value_21
Day_Select = "Day_20"
Update_Screen
Exclude = Value_20
Day_Select = "Day_19"
Update_Screen
Exclude = Value_19
Day_Select = "Day_18"
Update_Screen
Exclude = Value_18
Day_Select = "Day_17"
Update_Screen
Exclude = Value_17
Day_Select = "Day_16"
Update_Screen
Exclude = Value_16
Day_Select = "Day_15"
Update_Screen
Exclude = Value_15
Day_Select = "Day_14"
Update_Screen
Exclude = Value_14
Day_Select = "Day_13"
Update_Screen
Exclude = Value_13
Day_Select = "Day_12"
Update_Screen
Exclude = Value_12
Day_Select = "Day_11"
Update_Screen
Exclude = Value_11
Day_Select = "Day_10"
Update_Screen
Exclude = Value_10
Day_Select = "Day_9"
Update_Screen
Exclude = Value_9
Day_Select = "Day_8"
Update_Screen
Exclude = Value_8
Day_Select = "Day_7"
Update_Screen
Exclude = Value_7
Day_Select = "Day_6"
Update_Screen
Exclude = Value_6
Day_Select = "Day_5"
Update_Screen
Exclude = Value_5
Day_Select = "Day_4"
Update_Screen
Exclude = Value_4
Day_Select = "Day_3"
Update_Screen
Exclude = Value_3
Day_Select = "Day_2"
Update_Screen
Exclude = Value_2
Day_Select = "Day_1"
Update_Screen
Exclude = Value_1
Day_Select = "All_Other"
Update_Screen
End Sub


Sub Update_Screen()
Dim numLargestValue As Double: Dim numLargestDay As Long: Dim strDays As String: Dim Count As Integer
numLargestValue = 0: numLargestDay = 0 ' Initialize variables.
Largest_Value = numLargestValue: Largest_Day = numLargestDay

If numLargestValue <= SumOf1 And SumOf1 < Exclude Then
If numLargestValue = SumOf1 Then
numLargestDay = numLargestDay + 1: strDays = " 1 "
Else: numLargestDay = 1: strDays = "1": End If: numLargestValue = SumOf1
End If
If numLargestValue <= SumOf2 And SumOf2 < Exclude Then
If numLargestValue = SumOf2 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 2 "
Else: numLargestDay = 1: strDays = "2": End If: numLargestValue = SumOf2
End If
If numLargestValue <= SumOf3 And SumOf3 < Exclude Then
If numLargestValue = SumOf3 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 3 "
Else: numLargestDay = 1: strDays = "3": End If: numLargestValue = SumOf3
End If
If numLargestValue <= SumOf4 And SumOf4 < Exclude Then
If numLargestValue = SumOf4 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 4 "
Else: numLargestDay = 1: strDays = "4": End If: numLargestValue = SumOf4
End If
If numLargestValue <= SumOf5 And SumOf5 < Exclude Then
If numLargestValue = SumOf5 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 5 "
Else: numLargestDay = 1: strDays = "5": End If: numLargestValue = SumOf5
End If
If numLargestValue <= SumOf6 And SumOf6 < Exclude Then
If numLargestValue = SumOf6 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 6 "
Else: numLargestDay = 1: strDays = "6": End If: numLargestValue = SumOf6
End If
If numLargestValue <= SumOf7 And SumOf7 < Exclude Then
If numLargestValue = SumOf7 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 7 "
Else: numLargestDay = 1: strDays = "7": End If: numLargestValue = SumOf7
End If
If numLargestValue <= SumOf8 And SumOf8 < Exclude Then
If numLargestValue = SumOf8 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 8 "
Else: numLargestDay = 1: strDays = "8": End If: numLargestValue = SumOf8
End If
If numLargestValue <= SumOf9 And SumOf9 < Exclude Then
If numLargestValue = SumOf9 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 9 "
Else: numLargestDay = 1: strDays = "9": End If: numLargestValue = SumOf9
End If
If numLargestValue <= SumOf10 And SumOf10 < Exclude Then
If numLargestValue = SumOf10 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 10 "
Else: numLargestDay = 1: strDays = "10": End If: numLargestValue = SumOf10
End If
If numLargestValue <= SumOf11 And SumOf11 < Exclude Then
If numLargestValue = SumOf11 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 11 "
Else: numLargestDay = 1: strDays = "11": End If: numLargestValue = SumOf11
End If
If numLargestValue <= SumOf12 And SumOf12 < Exclude Then
If numLargestValue = SumOf12 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 12 "
Else: numLargestDay = 1: strDays = "12": End If: numLargestValue = SumOf12
End If
If numLargestValue <= SumOf13 And SumOf13 < Exclude Then
If numLargestValue = SumOf13 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 13 "
Else: numLargestDay = 1: strDays = "13": End If: numLargestValue = SumOf13
End If
If numLargestValue <= SumOf14 And SumOf14 < Exclude Then
If numLargestValue = SumOf14 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 14 "
Else: numLargestDay = 1: strDays = "14": End If: numLargestValue = SumOf14
End If
If numLargestValue <= SumOf15 And SumOf15 < Exclude Then
If numLargestValue = SumOf15 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 15 "
Else: numLargestDay = 1: strDays = "15": End If: numLargestValue = SumOf15
End If
If numLargestValue <= SumOf16 And SumOf16 < Exclude Then
If numLargestValue = SumOf16 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 16 "
Else: numLargestDay = 1: strDays = "16": End If: numLargestValue = SumOf16
End If
If numLargestValue <= SumOf17 And SumOf17 < Exclude Then
If numLargestValue = SumOf17 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 17 "
Else: numLargestDay = 1: strDays = "17": End If: numLargestValue = SumOf17
End If
If numLargestValue <= SumOf18 And SumOf18 < Exclude Then
If numLargestValue = SumOf18 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 18 "
Else: numLargestDay = 1: strDays = "18": End If: numLargestValue = SumOf18
End If
If numLargestValue <= SumOf19 And SumOf19 < Exclude Then
If numLargestValue = SumOf19 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 19 "
Else: numLargestDay = 1: strDays = "19": End If: numLargestValue = SumOf19
End If
If numLargestValue <= SumOf20 And SumOf20 < Exclude Then
If numLargestValue = SumOf20 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 20"
Else: numLargestDay = 1: strDays = "20": End If: numLargestValue = SumOf20
End If
If numLargestValue <= SumOf21 And SumOf21 < Exclude Then
If numLargestValue = SumOf21 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 21"
Else: numLargestDay = 1: strDays = "21": End If: numLargestValue = SumOf21
End If
If numLargestValue <= SumOf22 And SumOf22 < Exclude Then
If numLargestValue = SumOf22 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 22"
Else: numLargestDay = 1: strDays = "22": End If: numLargestValue = SumOf22
End If
If numLargestValue <= SumOf23 And SumOf23 < Exclude Then
If numLargestValue = SumOf23 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 23"
Else: numLargestDay = 1: strDays = "23": End If: numLargestValue = SumOf23
End If
If numLargestValue <= SumOf24 And SumOf24 < Exclude Then
If numLargestValue = SumOf24 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 24"
Else: numLargestDay = 1: strDays = "24": End If: numLargestValue = SumOf24
End If
If numLargestValue <= SumOf25 And SumOf25 < Exclude Then
If numLargestValue = SumOf25 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 25"
Else: numLargestDay = 1: strDays = "25": End If: numLargestValue = SumOf25
End If
If numLargestValue <= SumOf26 And SumOf26 < Exclude Then
If numLargestValue = SumOf26 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 26"
Else: numLargestDay = 1: strDays = "26": End If: numLargestValue = SumOf26
End If
If numLargestValue <= SumOf27 And SumOf27 < Exclude Then
If numLargestValue = SumOf27 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 27"
Else: numLargestDay = 1: strDays = "27": End If: numLargestValue = SumOf27
End If
If numLargestValue <= SumOf28 And SumOf28 < Exclude Then
If numLargestValue = SumOf28 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 28"
Else: numLargestDay = 1: strDays = "28": End If: numLargestValue = SumOf28
End If
If numLargestValue <= SumOf29 And SumOf29 < Exclude Then
If numLargestValue = SumOf29 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 29"
Else: numLargestDay = 1: strDays = "29": End If: numLargestValue = SumOf29
End If
If numLargestValue <= SumOf30 And SumOf30 < Exclude Then
If numLargestValue = SumOf30 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 30"
Else: numLargestDay = 1: strDays = "30": End If: numLargestValue = SumOf30
End If
If numLargestValue <= SumOf31 And SumOf31 < Exclude Then
If numLargestValue = SumOf31 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 31"
Else: numLargestDay = 1: strDays = "31": End If: numLargestValue = SumOf31
End If
If numLargestValue <= SumOf32 And SumOf32 < Exclude Then
If numLargestValue = SumOf32 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 32"
Else: numLargestDay = 1: strDays = "32": End If: numLargestValue = SumOf32
End If
If numLargestValue <= SumOf33 And SumOf33 < Exclude Then
If numLargestValue = SumOf33 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 33"
Else: numLargestDay = 1: strDays = "33": End If: numLargestValue = SumOf33
End If
If numLargestValue <= SumOf34 And SumOf34 < Exclude Then
If numLargestValue = SumOf34 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 34"
Else: numLargestDay = 1: strDays = "34": End If: numLargestValue = SumOf34
End If
If numLargestValue <= SumOf35 And SumOf35 < Exclude Then
If numLargestValue = SumOf35 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 35"
Else: numLargestDay = 1: strDays = "35": End If: numLargestValue = SumOf35
End If
If numLargestValue <= SumOf36 And SumOf36 < Exclude Then
If numLargestValue = SumOf36 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 36"
Else: numLargestDay = 1: strDays = "36": End If: numLargestValue = SumOf36
End If
If numLargestValue <= SumOf37 And SumOf37 < Exclude Then
If numLargestValue = SumOf37 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 37"
Else: numLargestDay = 1: strDays = "37": End If: numLargestValue = SumOf37
End If
If numLargestValue <= SumOf38 And SumOf38 < Exclude Then
If numLargestValue = SumOf38 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 38"
Else: numLargestDay = 1: strDays = "38": End If: numLargestValue = SumOf38
End If
If numLargestValue <= SumOf39 And SumOf39 < Exclude Then
If numLargestValue = SumOf39 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 39"
Else: numLargestDay = 1: strDays = "39": End If: numLargestValue = SumOf39
End If
If numLargestValue <= SumOf40 And SumOf40 < Exclude Then
If numLargestValue = SumOf40 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 40"
Else: numLargestDay = 1: strDays = "40": End If: numLargestValue = SumOf40
End If
If numLargestValue <= SumOf41 And SumOf41 < Exclude Then
If numLargestValue = SumOf41 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 41"
Else: numLargestDay = 1: strDays = "41": End If: numLargestValue = SumOf41
End If
If numLargestValue <= SumOf42 And SumOf42 < Exclude Then
If numLargestValue = SumOf42 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 42"
Else: numLargestDay = 1: strDays = "42": End If: numLargestValue = SumOf42
End If
If numLargestValue <= SumOf43 And SumOf43 < Exclude Then
If numLargestValue = SumOf43 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 43"
Else: numLargestDay = 1: strDays = "43": End If: numLargestValue = SumOf43
End If
If numLargestValue <= SumOf44 And SumOf44 < Exclude Then
If numLargestValue = SumOf44 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 44"
Else: numLargestDay = 1: strDays = "44": End If: numLargestValue = SumOf44
End If
If numLargestValue <= SumOf45 And SumOf45 < Exclude Then
If numLargestValue = SumOf45 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 45"
Else: numLargestDay = 1: strDays = "45": End If: numLargestValue = SumOf45
End If
If numLargestValue <= SumOf46 And SumOf46 < Exclude Then
If numLargestValue = SumOf46 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 46"
Else: numLargestDay = 1: strDays = "46": End If: numLargestValue = SumOf46
End If
If numLargestValue <= SumOf47 And SumOf47 < Exclude Then
If numLargestValue = SumOf47 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 47"
Else: numLargestDay = 1: strDays = "47": End If: numLargestValue = SumOf47
End If
If numLargestValue <= SumOf48 And SumOf48 < Exclude Then
If numLargestValue = SumOf48 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 48"
Else: numLargestDay = 1: strDays = "48": End If: numLargestValue = SumOf48
End If
If numLargestValue <= SumOf49 And SumOf49 < Exclude Then
If numLargestValue = SumOf49 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 49"
Else: numLargestDay = 1: strDays = "49": End If: numLargestValue = SumOf49
End If
If numLargestValue <= SumOf50 And SumOf50 < Exclude Then
If numLargestValue = SumOf50 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 50"
Else: numLargestDay = 1: strDays = "50": End If: numLargestValue = SumOf50
End If
If numLargestValue <= SumOf51 And SumOf51 < Exclude Then
If numLargestValue = SumOf51 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 51"
Else: numLargestDay = 1: strDays = "51": End If: numLargestValue = SumOf51
End If
If numLargestValue <= SumOf52 And SumOf52 < Exclude Then
If numLargestValue = SumOf52 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 52"
Else: numLargestDay = 1: strDays = "52": End If: numLargestValue = SumOf52
End If
If numLargestValue <= SumOf53 And SumOf53 < Exclude Then
If numLargestValue = SumOf53 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 53"
Else: numLargestDay = 1: strDays = "53": End If: numLargestValue = SumOf53
End If
If numLargestValue <= SumOf54 And SumOf54 < Exclude Then
If numLargestValue = SumOf54 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 54"
Else: numLargestDay = 1: strDays = "54": End If: numLargestValue = SumOf54
End If
If numLargestValue <= SumOf55 And SumOf55 < Exclude Then
If numLargestValue = SumOf55 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 55"
Else: numLargestDay = 1: strDays = "55": End If: numLargestValue = SumOf55
End If
If numLargestValue <= SumOf56 And SumOf56 < Exclude Then
If numLargestValue = SumOf56 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 56"
Else: numLargestDay = 1: strDays = "56": End If: numLargestValue = SumOf56
End If
If numLargestValue <= SumOf57 And SumOf57 < Exclude Then
If numLargestValue = SumOf57 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 57"
Else: numLargestDay = 1: strDays = "57": End If: numLargestValue = SumOf57
End If
If numLargestValue <= SumOf58 And SumOf58 < Exclude Then
If numLargestValue = SumOf58 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 58"
Else: numLargestDay = 1: strDays = "58": End If: numLargestValue = SumOf58
End If
If numLargestValue <= SumOf59 And SumOf59 < Exclude Then
If numLargestValue = SumOf59 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 59"
Else: numLargestDay = 1: strDays = "59": End If: numLargestValue = SumOf59
End If
If numLargestValue <= SumOf60 And SumOf60 < Exclude Then
If numLargestValue = SumOf60 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 60"
Else: numLargestDay = 1: strDays = "60": End If: numLargestValue = SumOf60
End If
If numLargestValue <= SumOf61 And SumOf61 < Exclude Then
If numLargestValue = SumOf61 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 61"
Else: numLargestDay = 1: strDays = "61": End If: numLargestValue = SumOf61
End If
If numLargestValue <= SumOf62 And SumOf62 < Exclude Then
If numLargestValue = SumOf62 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 62"
Else: numLargestDay = 1: strDays = "62": End If: numLargestValue = SumOf62
End If
If numLargestValue <= SumOf63 And SumOf63 < Exclude Then
If numLargestValue = SumOf63 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 63"
Else: numLargestDay = 1: strDays = "63": End If: numLargestValue = SumOf63
End If
If numLargestValue <= SumOf64 And SumOf64 < Exclude Then
If numLargestValue = SumOf64 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 64"
Else: numLargestDay = 1: strDays = "64": End If: numLargestValue = SumOf64
End If
If numLargestValue <= SumOf65 And SumOf65 < Exclude Then
If numLargestValue = SumOf65 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 65"
Else: numLargestDay = 1: strDays = "65": End If: numLargestValue = SumOf65
End If
If numLargestValue <= SumOf66 And SumOf66 < Exclude Then
If numLargestValue = SumOf66 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 66"
Else: numLargestDay = 1: strDays = "66": End If: numLargestValue = SumOf66
End If
If numLargestValue <= SumOf67 And SumOf67 < Exclude Then
If numLargestValue = SumOf67 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 67"
Else: numLargestDay = 1: strDays = "67": End If: numLargestValue = SumOf67
End If
If numLargestValue <= SumOf68 And SumOf68 < Exclude Then
If numLargestValue = SumOf68 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 68"
Else: numLargestDay = 1: strDays = "68": End If: numLargestValue = SumOf68
End If
If numLargestValue <= SumOf69 And SumOf69 < Exclude Then
If numLargestValue = SumOf69 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 69"
Else: numLargestDay = 1: strDays = "69": End If: numLargestValue = SumOf69
End If
If numLargestValue <= SumOf70 And SumOf70 < Exclude Then
If numLargestValue = SumOf70 And SumOf70 < Exclude Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 70"
Else: numLargestDay = 1: strDays = "70": End If: numLargestValue = SumOf70
End If
If numLargestValue <= SumOf71 And SumOf71 < Exclude Then
If numLargestValue = SumOf71 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 71"
Else: numLargestDay = 1: strDays = "71": End If: numLargestValue = SumOf71
End If
If numLargestValue <= SumOf72 And SumOf72 < Exclude Then
If numLargestValue = SumOf72 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 72"
Else: numLargestDay = 1: strDays = "72": End If: numLargestValue = SumOf72
End If
If numLargestValue <= SumOf73 And SumOf73 < Exclude Then
If numLargestValue = SumOf73 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 73"
Else: numLargestDay = 1: strDays = "73": End If: numLargestValue = SumOf73
End If
If numLargestValue <= SumOf74 And SumOf74 < Exclude Then
If numLargestValue = SumOf74 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 74"
Else: numLargestDay = 1: strDays = "74": End If: numLargestValue = SumOf74
End If
If numLargestValue <= SumOf75 And SumOf75 < Exclude Then
If numLargestValue = SumOf75 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 75"
Else: numLargestDay = 1: strDays = "75": End If: numLargestValue = SumOf75
End If
If numLargestValue <= SumOf76 And SumOf76 < Exclude Then
If numLargestValue = SumOf76 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 76"
Else: numLargestDay = 1: strDays = "76": End If: numLargestValue = SumOf76
End If
If numLargestValue <= SumOf77 And SumOf77 < Exclude Then
If numLargestValue = SumOf77 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 77"
Else: numLargestDay = 1: strDays = "77": End If: numLargestValue = SumOf77
End If
If numLargestValue <= SumOf78 And SumOf78 < Exclude Then
If numLargestValue = SumOf78 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 78"
Else: numLargestDay = 1: strDays = "78": End If: numLargestValue = SumOf78
End If
If numLargestValue <= SumOf79 And SumOf79 < Exclude Then
If numLargestValue = SumOf79 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 79"
Else: numLargestDay = 1: strDays = "79": End If: numLargestValue = SumOf79
End If
If numLargestValue <= SumOf80 And SumOf80 < Exclude Then
If numLargestValue = SumOf80 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 80"
Else: numLargestDay = 1: strDays = "80": End If: numLargestValue = SumOf80
End If
If numLargestValue <= SumOf81 And SumOf81 < Exclude Then
If numLargestValue = SumOf81 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 81"
Else: numLargestDay = 1: strDays = "81": End If: numLargestValue = SumOf81
End If
If numLargestValue <= SumOf82 And SumOf82 < Exclude Then
If numLargestValue = SumOf82 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 82"
Else: numLargestDay = 1: strDays = "82": End If: numLargestValue = SumOf82
End If
If numLargestValue <= SumOf83 And SumOf83 < Exclude Then
If numLargestValue = SumOf83 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 83"
Else: numLargestDay = 1: strDays = "83": End If: numLargestValue = SumOf83
End If
If numLargestValue <= SumOf84 And SumOf84 < Exclude Then
If numLargestValue = SumOf84 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 84"
Else: numLargestDay = 1: strDays = "84": End If: numLargestValue = SumOf84
End If
If numLargestValue <= SumOf85 And SumOf85 < Exclude Then
If numLargestValue = SumOf85 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 85"
Else: numLargestDay = 1: strDays = "85": End If: numLargestValue = SumOf85
End If
If numLargestValue <= SumOf86 And SumOf86 < Exclude Then
If numLargestValue = SumOf86 And SumOf86 < Exclude Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 86"
Else: numLargestDay = 1: strDays = "86": End If: numLargestValue = SumOf86
End If
If numLargestValue <= SumOf87 And SumOf87 < Exclude Then
If numLargestValue = SumOf87 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 87"
Else: numLargestDay = 1: strDays = "87": End If: numLargestValue = SumOf87
End If
If numLargestValue <= SumOf88 And SumOf88 < Exclude Then
If numLargestValue = SumOf88 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 88"
Else: numLargestDay = 1: strDays = "88": End If: numLargestValue = SumOf88
End If
If numLargestValue <= SumOf89 And SumOf89 < Exclude Then
If numLargestValue = SumOf89 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 89"
Else: numLargestDay = 1: strDays = "89": End If: numLargestValue = SumOf89
End If
If numLargestValue <= SumOf90 And SumOf90 < Exclude Then
If numLargestValue = SumOf90 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 90"
Else: numLargestDay = 1: strDays = "90": End If: numLargestValue = SumOf90
End If
If numLargestValue <= SumOf91 And SumOf91 < Exclude Then
If numLargestValue = SumOf91 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 91"
Else: numLargestDay = 1: strDays = "91": End If: numLargestValue = SumOf91
End If
If numLargestValue <= SumOf92 And SumOf92 < Exclude Then
If numLargestValue = SumOf92 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 92"
Else: numLargestDay = 1: strDays = "92": End If: numLargestValue = SumOf92
End If
If numLargestValue <= SumOf93 And SumOf93 < Exclude Then
If numLargestValue = SumOf93 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 93"
Else: numLargestDay = 1: strDays = "93": End If: numLargestValue = SumOf93
End If
If numLargestValue <= SumOf94 And SumOf94 < Exclude Then
If numLargestValue = SumOf94 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 94"
Else: numLargestDay = 1: strDays = "94": End If: numLargestValue = SumOf94
End If
If numLargestValue <= SumOf95 And SumOf95 < Exclude Then
If numLargestValue = SumOf95 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 95"
Else: numLargestDay = 1: strDays = "95": End If: numLargestValue = SumOf95
End If
If numLargestValue <= SumOf96 And SumOf96 < Exclude Then
If numLargestValue = SumOf96 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 96"
Else: numLargestDay = 1: strDays = "96": End If: numLargestValue = SumOf96
End If
If numLargestValue <= SumOf97 And SumOf97 < Exclude Then
If numLargestValue = SumOf97 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 97"
Else: numLargestDay = 1: strDays = "97": End If: numLargestValue = SumOf97
End If
If numLargestValue <= SumOf98 And SumOf98 < Exclude Then
If numLargestValue = SumOf98 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 98"
Else: numLargestDay = 1: strDays = "98": End If: numLargestValue = SumOf98
End If
If numLargestValue <= SumOf99 And SumOf99 < Exclude Then
If numLargestValue = SumOf99 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 99"
Else: numLargestDay = 1: strDays = "99": End If: numLargestValue = SumOf99
End If
If numLargestValue <= SumOf100 And SumOf100 < Exclude Then
If numLargestValue = SumOf100 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 100"
Else: numLargestDay = 1: strDays = "100": End If: numLargestValue = SumOf100
End If
If numLargestValue <= SumOf101 And SumOf101 < Exclude Then
If numLargestValue = SumOf101 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 101"
Else: numLargestDay = 1: strDays = "101": End If: numLargestValue = SumOf101
End If
If numLargestValue <= SumOf102 And SumOf102 < Exclude Then
If numLargestValue = SumOf102 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 102"
Else: numLargestDay = 1: strDays = "102": End If: numLargestValue = SumOf102
End If
If numLargestValue <= SumOf103 And SumOf103 < Exclude Then
If numLargestValue = SumOf103 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 103"
Else: numLargestDay = 1: strDays = "103": End If: numLargestValue = SumOf103
End If
If numLargestValue <= SumOf104 And SumOf104 < Exclude Then
If numLargestValue = SumOf104 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 104"
Else: numLargestDay = 1: strDays = "104": End If: numLargestValue = SumOf104
End If
If numLargestValue <= SumOf105 And SumOf105 < Exclude Then
If numLargestValue = SumOf105 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 105"
Else: numLargestDay = 1: strDays = "105": End If: numLargestValue = SumOf105
End If
If numLargestValue <= SumOf106 And SumOf106 < Exclude Then
If numLargestValue = SumOf106 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 106"
Else: numLargestDay = 1: strDays = "106": End If: numLargestValue = SumOf106
End If
If numLargestValue <= SumOf107 And SumOf107 < Exclude Then
If numLargestValue = SumOf107 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 107"
Else: numLargestDay = 1: strDays = "107": End If: numLargestValue = SumOf107
End If
If numLargestValue <= SumOf108 And SumOf108 < Exclude Then
If numLargestValue = SumOf108 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 108"
Else: numLargestDay = 1: strDays = "108": End If: numLargestValue = SumOf108
End If
If numLargestValue <= SumOf109 And SumOf109 < Exclude Then
If numLargestValue = SumOf109 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 109"
Else: numLargestDay = 1: strDays = "109": End If: numLargestValue = SumOf109
End If
If numLargestValue <= SumOf110 And SumOf110 < Exclude Then
If numLargestValue = SumOf110 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 110"
Else: numLargestDay = 1: strDays = "110": End If: numLargestValue = SumOf110
End If
If numLargestValue <= SumOf111 And SumOf111 < Exclude Then
If numLargestValue = SumOf111 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 111"
Else: numLargestDay = 1: strDays = "111": End If: numLargestValue = SumOf111
End If
If numLargestValue <= SumOf112 And SumOf112 < Exclude Then
If numLargestValue = SumOf112 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 112"
Else: numLargestDay = 1: strDays = "112": End If: numLargestValue = SumOf112
End If
If numLargestValue <= SumOf113 And SumOf113 < Exclude Then
If numLargestValue = SumOf113 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 113"
Else: numLargestDay = 1: strDays = "113": End If: numLargestValue = SumOf113
End If
If numLargestValue <= SumOf114 And SumOf114 < Exclude Then
If numLargestValue = SumOf114 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 114"
Else: numLargestDay = 1: strDays = "114": End If: numLargestValue = SumOf114
End If
If numLargestValue <= SumOf115 And SumOf115 < Exclude Then
If numLargestValue = SumOf115 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 115"
Else: numLargestDay = 1: strDays = "115": End If: numLargestValue = SumOf115
End If
If numLargestValue <= SumOf116 And SumOf116 < Exclude Then
If numLargestValue = SumOf116 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 116"
Else: numLargestDay = 1: strDays = "116": End If: numLargestValue = SumOf116
End If
If numLargestValue <= SumOf117 And SumOf117 < Exclude Then
If numLargestValue = SumOf117 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 117"
Else: numLargestDay = 1: strDays = "117": End If: numLargestValue = SumOf117
End If
If numLargestValue <= SumOf118 And SumOf118 < Exclude Then
If numLargestValue = SumOf118 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 118"
Else: numLargestDay = 1: strDays = "118": End If: numLargestValue = SumOf118
End If
If numLargestValue <= SumOf119 And SumOf119 < Exclude Then
If numLargestValue = SumOf119 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 119"
Else: numLargestDay = 1: strDays = "119": End If: numLargestValue = SumOf119
End If
If numLargestValue <= SumOf120 And SumOf120 < Exclude Then
If numLargestValue = SumOf120 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 120"
Else: numLargestDay = 1: strDays = "120": End If: numLargestValue = SumOf120
End If
If numLargestValue <= SumOf121 And SumOf121 < Exclude Then
If numLargestValue = SumOf121 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 121"
Else: numLargestDay = 1: strDays = "121": End If: numLargestValue = SumOf121
End If
If numLargestValue <= SumOf122 And SumOf122 < Exclude Then
If numLargestValue = SumOf122 And SumOf120 < Exclude Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 122"
Else: numLargestDay = 1: strDays = "122": End If: numLargestValue = SumOf122
End If
If numLargestValue <= SumOf123 And SumOf123 < Exclude Then
If numLargestValue = SumOf123 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 123"
Else: numLargestDay = 1: strDays = "123": End If: numLargestValue = SumOf123
End If
If numLargestValue <= SumOf124 And SumOf124 < Exclude Then
If numLargestValue = SumOf124 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 124"
Else: numLargestDay = 1: strDays = "124": End If: numLargestValue = SumOf124
End If
If numLargestValue <= SumOf125 And SumOf125 < Exclude Then
If numLargestValue = SumOf125 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 125"
Else: numLargestDay = 1: strDays = "125": End If: numLargestValue = SumOf125
End If
If numLargestValue <= SumOf126 And SumOf126 < Exclude Then
If numLargestValue = SumOf126 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 126"
Else: numLargestDay = 1: strDays = "126": End If: numLargestValue = SumOf126
End If
If numLargestValue <= SumOf127 And SumOf127 < Exclude Then
If numLargestValue = SumOf127 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 127"
Else: numLargestDay = 1: strDays = "127": End If: numLargestValue = SumOf127
End If
If numLargestValue <= SumOf128 And SumOf128 < Exclude Then
If numLargestValue = SumOf128 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 128"
Else: numLargestDay = 1: strDays = "128": End If: numLargestValue = SumOf128
End If
If numLargestValue <= SumOf129 And SumOf129 < Exclude Then
If numLargestValue = SumOf129 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 129"
Else: numLargestDay = 1: strDays = "129": End If: numLargestValue = SumOf129
End If
If numLargestValue <= SumOf130 And SumOf130 < Exclude Then
If numLargestValue = SumOf130 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 130"
Else: numLargestDay = 1: strDays = "130": End If: numLargestValue = SumOf130
End If
If numLargestValue <= SumOf131 And SumOf131 < Exclude Then
If numLargestValue = SumOf131 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 131"
Else: numLargestDay = 1: strDays = "131": End If: numLargestValue = SumOf131
End If
If numLargestValue <= SumOf132 And SumOf132 < Exclude Then
If numLargestValue = SumOf132 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 132"
Else: numLargestDay = 1: strDays = "132": End If: numLargestValue = SumOf132
End If
If numLargestValue <= SumOf133 And SumOf133 < Exclude Then
If numLargestValue = SumOf133 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 133"
Else: numLargestDay = 1: strDays = "133": End If: numLargestValue = SumOf133
End If
If numLargestValue <= SumOf134 And SumOf134 < Exclude Then
If numLargestValue = SumOf134 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 134"
Else: numLargestDay = 1: strDays = "134": End If: numLargestValue = SumOf134
End If
If numLargestValue <= SumOf135 And SumOf135 < Exclude Then
If numLargestValue = SumOf135 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 135"
Else: numLargestDay = 1: strDays = "135": End If: numLargestValue = SumOf135
End If
If numLargestValue <= SumOf136 And SumOf136 < Exclude Then
If numLargestValue = SumOf136 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 136"
Else: numLargestDay = 1: strDays = "136": End If: numLargestValue = SumOf136
End If
If numLargestValue <= SumOf137 And SumOf137 < Exclude Then
If numLargestValue = SumOf137 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 137"
Else: numLargestDay = 1: strDays = "137": End If: numLargestValue = SumOf137
End If
If numLargestValue <= SumOf138 And SumOf138 < Exclude Then
If numLargestValue = SumOf138 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 138"
Else: numLargestDay = 1: strDays = "138": End If: numLargestValue = SumOf138
End If
If numLargestValue <= SumOf139 And SumOf139 < Exclude Then
If numLargestValue = SumOf139 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 139"
Else: numLargestDay = 1: strDays = "139": End If: numLargestValue = SumOf139
End If
If numLargestValue <= SumOf140 And SumOf140 < Exclude Then
If numLargestValue = SumOf140 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 140"
Else: numLargestDay = 1: strDays = "140": End If: numLargestValue = SumOf140
End If
If numLargestValue <= SumOf141 And SumOf141 < Exclude Then
If numLargestValue = SumOf141 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 141"
Else: numLargestDay = 1: strDays = "141": End If: numLargestValue = SumOf141
End If
If numLargestValue <= SumOf142 And SumOf142 < Exclude Then
If numLargestValue = SumOf142 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 142"
Else: numLargestDay = 1: strDays = "142": End If: numLargestValue = SumOf142
End If
If numLargestValue <= SumOf143 And SumOf143 < Exclude Then
If numLargestValue = SumOf143 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 143"
Else: numLargestDay = 1: strDays = "143": End If: numLargestValue = SumOf143
End If
If numLargestValue <= SumOf144 And SumOf144 < Exclude Then
If numLargestValue = SumOf144 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 144"
Else: numLargestDay = 1: strDays = "144": End If: numLargestValue = SumOf144
End If
If numLargestValue <= SumOf145 And SumOf145 < Exclude Then
If numLargestValue = SumOf145 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 145"
Else: numLargestDay = 1: strDays = "145": End If: numLargestValue = SumOf145
End If
If numLargestValue <= SumOf146 And SumOf146 < Exclude Then
If numLargestValue = SumOf146 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 146"
Else: numLargestDay = 1: strDays = "146": End If: numLargestValue = SumOf146
End If
If numLargestValue <= SumOf147 And SumOf147 < Exclude Then
If numLargestValue = SumOf147 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 147"
Else: numLargestDay = 1: strDays = "147": End If: numLargestValue = SumOf147
End If
If numLargestValue <= SumOf148 And SumOf148 < Exclude Then
If numLargestValue = SumOf148 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 148"
Else: numLargestDay = 1: strDays = "148": End If: numLargestValue = SumOf148
End If
If numLargestValue <= SumOf149 And SumOf149 < Exclude Then
If numLargestValue = SumOf149 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 149"
Else: numLargestDay = 1: strDays = "149": End If: numLargestValue = SumOf149
End If
If numLargestValue <= SumOf150 And SumOf150 < Exclude Then
If numLargestValue = SumOf150 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 150"
Else: numLargestDay = 1: strDays = "150": End If: numLargestValue = SumOf150
End If
If numLargestValue <= SumOf151 And SumOf151 < Exclude Then
If numLargestValue = SumOf151 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 151"
Else: numLargestDay = 1: strDays = "151": End If: numLargestValue = SumOf151
End If
If numLargestValue <= SumOf152 And SumOf152 < Exclude Then
If numLargestValue = SumOf152 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 152"
Else: numLargestDay = 1: strDays = "152": End If: numLargestValue = SumOf152
End If
If numLargestValue <= SumOf153 And SumOf153 < Exclude Then
If numLargestValue = SumOf153 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 153"
Else: numLargestDay = 1: strDays = "153": End If: numLargestValue = SumOf153
End If
If numLargestValue <= SumOf154 And SumOf154 < Exclude Then
If numLargestValue = SumOf154 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 154"
Else: numLargestDay = 1: strDays = "154": End If: numLargestValue = SumOf154
End If
If numLargestValue <= SumOf155 And SumOf155 < Exclude Then
If numLargestValue = SumOf155 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 155"
Else: numLargestDay = 1: strDays = "155": End If: numLargestValue = SumOf155
End If
If numLargestValue <= SumOf156 And SumOf156 < Exclude Then
If numLargestValue = SumOf156 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 156"
Else: numLargestDay = 1: strDays = "156": End If: numLargestValue = SumOf156
End If
If numLargestValue <= SumOf157 And SumOf157 < Exclude Then
If numLargestValue = SumOf157 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 157"
Else: numLargestDay = 1: strDays = "157": End If: numLargestValue = SumOf157
End If
If numLargestValue <= SumOf158 And SumOf158 < Exclude Then
If numLargestValue = SumOf158 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 158"
Else: numLargestDay = 1: strDays = "158": End If: numLargestValue = SumOf158
End If
If numLargestValue <= SumOf159 And SumOf159 < Exclude Then
If numLargestValue = SumOf159 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 159"
Else: numLargestDay = 1: strDays = "159": End If: numLargestValue = SumOf159
End If
If numLargestValue <= SumOf160 And SumOf160 < Exclude Then
If numLargestValue = SumOf160 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 160"
Else: numLargestDay = 1: strDays = "160": End If: numLargestValue = SumOf160
End If
If numLargestValue <= SumOf161 And SumOf161 < Exclude Then
If numLargestValue = SumOf161 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 161"
Else: numLargestDay = 1: strDays = "161": End If: numLargestValue = SumOf161
End If
If numLargestValue <= SumOf162 And SumOf162 < Exclude Then
If numLargestValue = SumOf162 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 162"
Else: numLargestDay = 1: strDays = "162": End If: numLargestValue = SumOf162
End If
If numLargestValue <= SumOf163 And SumOf163 < Exclude Then
If numLargestValue = SumOf163 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 163"
Else: numLargestDay = 1: strDays = "163": End If: numLargestValue = SumOf163
End If
If numLargestValue <= SumOf164 And SumOf164 < Exclude Then
If numLargestValue = SumOf164 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 164"
Else: numLargestDay = 1: strDays = "164": End If: numLargestValue = SumOf164
End If
If numLargestValue <= SumOf165 And SumOf165 < Exclude Then
If numLargestValue = SumOf165 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 165"
Else: numLargestDay = 1: strDays = "165": End If: numLargestValue = SumOf165
End If
If numLargestValue <= SumOf166 And SumOf166 < Exclude Then
If numLargestValue = SumOf166 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 166"
Else: numLargestDay = 1: strDays = "166": End If: numLargestValue = SumOf166
End If
If numLargestValue <= SumOf167 And SumOf167 < Exclude Then
If numLargestValue = SumOf167 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 167"
Else: numLargestDay = 1: strDays = "167": End If: numLargestValue = SumOf167
End If
If numLargestValue <= SumOf168 And SumOf168 < Exclude Then
If numLargestValue = SumOf168 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 168"
Else: numLargestDay = 1: strDays = "168": End If: numLargestValue = SumOf168
End If
If numLargestValue <= SumOf169 And SumOf169 < Exclude Then
If numLargestValue = SumOf169 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 169"
Else: numLargestDay = 1: strDays = "169": End If: numLargestValue = SumOf169
End If
If numLargestValue <= SumOf170 And SumOf170 < Exclude Then
If numLargestValue = SumOf170 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 170"
Else: numLargestDay = 1: strDays = "170": End If: numLargestValue = SumOf170
End If
If numLargestValue <= SumOf171 And SumOf171 < Exclude Then
If numLargestValue = SumOf171 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 171"
Else: numLargestDay = 1: strDays = "171": End If: numLargestValue = SumOf171
End If
If numLargestValue <= SumOf172 And SumOf172 < Exclude Then
If numLargestValue = SumOf172 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 172"
Else: numLargestDay = 1: strDays = "172": End If: numLargestValue = SumOf172
End If
If numLargestValue <= SumOf173 And SumOf173 < Exclude Then
If numLargestValue = SumOf173 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 173"
Else: numLargestDay = 1: strDays = "173": End If: numLargestValue = SumOf173
End If
If numLargestValue <= SumOf174 And SumOf174 < Exclude Then
If numLargestValue = SumOf174 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 174"
Else: numLargestDay = 1: strDays = "174": End If: numLargestValue = SumOf174
End If
If numLargestValue <= SumOf175 And SumOf175 < Exclude Then
If numLargestValue = SumOf175 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 175"
Else: numLargestDay = 1: strDays = "175": End If: numLargestValue = SumOf175
End If
If numLargestValue <= SumOf176 And SumOf176 < Exclude Then
If numLargestValue = SumOf176 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 176"
Else: numLargestDay = 1: strDays = "176": End If: numLargestValue = SumOf176
End If
If numLargestValue <= SumOf177 And SumOf177 < Exclude Then
If numLargestValue = SumOf177 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 177"
Else: numLargestDay = 1: strDays = "177": End If: numLargestValue = SumOf177
End If
If numLargestValue <= SumOf178 And SumOf178 < Exclude Then
If numLargestValue = SumOf178 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 178"
Else: numLargestDay = 1: strDays = "178": End If: numLargestValue = SumOf178
End If
If numLargestValue <= SumOf179 And SumOf179 < Exclude Then
If numLargestValue = SumOf179 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 179"
Else: numLargestDay = 1: strDays = "179": End If: numLargestValue = SumOf179
End If
If numLargestValue <= SumOf180 And SumOf180 < Exclude Then
If numLargestValue = SumOf180 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 180"
Else: numLargestDay = 1: strDays = "180": End If: numLargestValue = SumOf180
End If
If numLargestValue <= SumOf181 And SumOf181 < Exclude Then
If numLargestValue = SumOf181 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 181"
Else: numLargestDay = 1: strDays = "181": End If: numLargestValue = SumOf181
End If
If numLargestValue <= SumOf182 And SumOf182 < Exclude Then
If numLargestValue = SumOf182 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 182"
Else: numLargestDay = 1: strDays = "182": End If: numLargestValue = SumOf182
End If
If numLargestValue <= SumOf183 And SumOf183 < Exclude Then
If numLargestValue = SumOf183 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 183"
Else: numLargestDay = 1: strDays = "183": End If: numLargestValue = SumOf183
End If
If numLargestValue <= SumOf184 And SumOf184 < Exclude Then
If numLargestValue = SumOf184 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 184"
Else: numLargestDay = 1: strDays = "184": End If: numLargestValue = SumOf184
End If
If numLargestValue <= SumOf185 And SumOf185 < Exclude Then
If numLargestValue = SumOf185 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 185"
Else: numLargestDay = 1: strDays = "185": End If: numLargestValue = SumOf185
End If
If numLargestValue <= SumOf186 And SumOf186 < Exclude Then
If numLargestValue = SumOf186 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 186"
Else: numLargestDay = 1: strDays = "186": End If: numLargestValue = SumOf186
End If
If numLargestValue <= SumOf187 And SumOf187 < Exclude Then
If numLargestValue = SumOf187 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 187"
Else: numLargestDay = 1: strDays = "187": End If: numLargestValue = SumOf187
End If
If numLargestValue <= SumOf188 And SumOf188 < Exclude Then
If numLargestValue = SumOf188 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 188"
Else: numLargestDay = 1: strDays = "188": End If: numLargestValue = SumOf188
End If
If numLargestValue <= SumOf189 And SumOf189 < Exclude Then
If numLargestValue = SumOf189 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 189"
Else: numLargestDay = 1: strDays = "189": End If: numLargestValue = SumOf189
End If
If numLargestValue <= SumOf190 And SumOf190 < Exclude Then
If numLargestValue = SumOf190 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 190"
Else: numLargestDay = 1: strDays = "190": End If: numLargestValue = SumOf190
End If
If numLargestValue <= SumOf191 And SumOf191 < Exclude Then
If numLargestValue = SumOf191 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 191"
Else: numLargestDay = 1: strDays = "191": End If: numLargestValue = SumOf191
End If
If numLargestValue <= SumOf192 And SumOf192 < Exclude Then
If numLargestValue = SumOf192 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 192"
Else: numLargestDay = 1: strDays = "192": End If: numLargestValue = SumOf192
End If
If numLargestValue <= SumOf193 And SumOf193 < Exclude Then
If numLargestValue = SumOf193 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 193"
Else: numLargestDay = 1: strDays = "193": End If: numLargestValue = SumOf193
End If
If numLargestValue <= SumOf194 And SumOf194 < Exclude Then
If numLargestValue = SumOf194 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 194"
Else: numLargestDay = 1: strDays = "194": End If: numLargestValue = SumOf194
End If
If numLargestValue <= SumOf195 And SumOf195 < Exclude Then
If numLargestValue = SumOf195 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 195"
Else: numLargestDay = 1: strDays = "195": End If: numLargestValue = SumOf195
End If
If numLargestValue <= SumOf196 And SumOf196 < Exclude Then
If numLargestValue = SumOf196 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 196"
Else: numLargestDay = 1: strDays = "196": End If: numLargestValue = SumOf196
End If
If numLargestValue <= SumOf197 And SumOf197 < Exclude Then
If numLargestValue = SumOf197 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 197"
Else: numLargestDay = 1: strDays = "197": End If: numLargestValue = SumOf197
End If
If numLargestValue <= SumOf198 And SumOf198 < Exclude Then
If numLargestValue = SumOf198 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 198"
Else: numLargestDay = 1: strDays = "198": End If: numLargestValue = SumOf198
End If
If numLargestValue <= SumOf199 And SumOf199 < Exclude Then
If numLargestValue = SumOf199 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 199"
Else: numLargestDay = 1: strDays = "199": End If: numLargestValue = SumOf199
End If
If numLargestValue <= SumOf200 And SumOf200 < Exclude Then
If numLargestValue = SumOf200 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 200"
Else: numLargestDay = 1: strDays = "200": End If: numLargestValue = SumOf200
End If
If numLargestValue <= SumOf201 And SumOf201 < Exclude Then
If numLargestValue = SumOf201 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 201"
Else: numLargestDay = 1: strDays = "201": End If: numLargestValue = SumOf201
End If
If numLargestValue <= SumOf202 And SumOf202 < Exclude Then
If numLargestValue = SumOf202 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 202"
Else: numLargestDay = 1: strDays = "202": End If: numLargestValue = SumOf202
End If
If numLargestValue <= SumOf203 And SumOf203 < Exclude Then
If numLargestValue = SumOf203 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 203"
Else: numLargestDay = 1: strDays = "203": End If: numLargestValue = SumOf203
End If
If numLargestValue <= SumOf204 And SumOf204 < Exclude Then
If numLargestValue = SumOf204 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 204"
Else: numLargestDay = 1: strDays = "204": End If: numLargestValue = SumOf204
End If
If numLargestValue <= SumOf205 And SumOf205 < Exclude Then
If numLargestValue = SumOf205 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 205"
Else: numLargestDay = 1: strDays = "205": End If: numLargestValue = SumOf205
End If
If numLargestValue <= SumOf206 And SumOf206 < Exclude Then
If numLargestValue = SumOf206 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 206"
Else: numLargestDay = 1: strDays = "206": End If: numLargestValue = SumOf206
End If
If numLargestValue <= SumOf207 And SumOf207 < Exclude Then
If numLargestValue = SumOf207 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 207"
Else: numLargestDay = 1: strDays = "207": End If: numLargestValue = SumOf207
End If
If numLargestValue <= SumOf208 And SumOf208 < Exclude Then
If numLargestValue = SumOf208 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 208"
Else: numLargestDay = 1: strDays = "208": End If: numLargestValue = SumOf208
End If
If numLargestValue <= SumOf209 And SumOf209 < Exclude Then
If numLargestValue = SumOf209 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 209"
Else: numLargestDay = 1: strDays = "209": End If: numLargestValue = SumOf209
End If
If numLargestValue <= SumOf210 And SumOf210 < Exclude Then
If numLargestValue = SumOf210 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 210"
Else: numLargestDay = 1: strDays = "210": End If: numLargestValue = SumOf210
End If
If numLargestValue <= SumOf211 And SumOf211 < Exclude Then
If numLargestValue = SumOf211 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 211"
Else: numLargestDay = 1: strDays = "211": End If: numLargestValue = SumOf211
End If
If numLargestValue <= SumOf212 And SumOf212 < Exclude Then
If numLargestValue = SumOf212 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 212"
Else: numLargestDay = 1: strDays = "212": End If: numLargestValue = SumOf212
End If
If numLargestValue <= SumOf213 And SumOf213 < Exclude Then
If numLargestValue = SumOf213 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 213"
Else: numLargestDay = 1: strDays = "213": End If: numLargestValue = SumOf213
End If
If numLargestValue <= SumOf214 And SumOf214 < Exclude Then
If numLargestValue = SumOf214 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 214"
Else: numLargestDay = 1: strDays = "214": End If: numLargestValue = SumOf214
End If
If numLargestValue <= SumOf215 And SumOf215 < Exclude Then
If numLargestValue = SumOf215 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 215"
Else: numLargestDay = 1: strDays = "215": End If: numLargestValue = SumOf215
End If
If numLargestValue <= SumOf216 And SumOf216 < Exclude Then
If numLargestValue = SumOf216 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 216"
Else: numLargestDay = 1: strDays = "216": End If: numLargestValue = SumOf216
End If
If numLargestValue <= SumOf217 And SumOf217 < Exclude Then
If numLargestValue = SumOf217 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 217"
Else: numLargestDay = 1: strDays = "217": End If: numLargestValue = SumOf217
End If
If numLargestValue <= SumOf218 And SumOf218 < Exclude Then
If numLargestValue = SumOf218 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 218"
Else: numLargestDay = 1: strDays = "218": End If: numLargestValue = SumOf218
End If
If numLargestValue <= SumOf219 And SumOf219 < Exclude Then
If numLargestValue = SumOf219 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 219"
Else: numLargestDay = 1: strDays = "219": End If: numLargestValue = SumOf219
End If
If numLargestValue <= SumOf220 And SumOf220 < Exclude Then
If numLargestValue = SumOf220 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 220"
Else: numLargestDay = 1: strDays = "220": End If: numLargestValue = SumOf220
End If
If numLargestValue <= SumOf221 And SumOf221 < Exclude Then
If numLargestValue = SumOf221 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 221"
Else: numLargestDay = 1: strDays = "221": End If: numLargestValue = SumOf221
End If
If numLargestValue <= SumOf222 And SumOf222 < Exclude Then
If numLargestValue = SumOf222 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 222"
Else: numLargestDay = 1: strDays = "222": End If: numLargestValue = SumOf222
End If
If numLargestValue <= SumOf223 And SumOf223 < Exclude Then
If numLargestValue = SumOf223 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 223"
Else: numLargestDay = 1: strDays = "223": End If: numLargestValue = SumOf223
End If
If numLargestValue <= SumOf224 And SumOf224 < Exclude Then
If numLargestValue = SumOf224 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 224"
Else: numLargestDay = 1: strDays = "224": End If: numLargestValue = SumOf224
End If
If numLargestValue <= SumOf225 And SumOf225 < Exclude Then
If numLargestValue = SumOf225 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 225"
Else: numLargestDay = 1: strDays = "225": End If: numLargestValue = SumOf225
End If
If numLargestValue <= SumOf226 And SumOf226 < Exclude Then
If numLargestValue = SumOf226 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 226"
Else: numLargestDay = 1: strDays = "226": End If: numLargestValue = SumOf226
End If
If numLargestValue <= SumOf227 And SumOf227 < Exclude Then
If numLargestValue = SumOf227 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 227"
Else: numLargestDay = 1: strDays = "227": End If: numLargestValue = SumOf227
End If
If numLargestValue <= SumOf228 And SumOf228 < Exclude Then
If numLargestValue = SumOf228 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 228"
Else: numLargestDay = 1: strDays = "228": End If: numLargestValue = SumOf228
End If
If numLargestValue <= SumOf229 And SumOf229 < Exclude Then
If numLargestValue = SumOf229 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 229"
Else: numLargestDay = 1: strDays = "229": End If: numLargestValue = SumOf229
End If
If numLargestValue <= SumOf230 And SumOf230 < Exclude Then
If numLargestValue = SumOf230 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 230"
Else: numLargestDay = 1: strDays = "230": End If: numLargestValue = SumOf230
End If
If numLargestValue <= SumOf231 And SumOf231 < Exclude Then
If numLargestValue = SumOf231 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 231"
Else: numLargestDay = 1: strDays = "231": End If: numLargestValue = SumOf231
End If
If numLargestValue <= SumOf232 And SumOf232 < Exclude Then
If numLargestValue = SumOf232 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 232"
Else: numLargestDay = 1: strDays = "232": End If: numLargestValue = SumOf232
End If
If numLargestValue <= SumOf233 And SumOf233 < Exclude Then
If numLargestValue = SumOf233 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 233"
Else: numLargestDay = 1: strDays = "233": End If: numLargestValue = SumOf233
End If
If numLargestValue <= SumOf234 And SumOf234 < Exclude Then
If numLargestValue = SumOf234 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 234"
Else: numLargestDay = 1: strDays = "234": End If: numLargestValue = SumOf234
End If
If numLargestValue <= SumOf235 And SumOf235 < Exclude Then
If numLargestValue = SumOf235 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 235"
Else: numLargestDay = 1: strDays = "235": End If: numLargestValue = SumOf235
End If
If numLargestValue <= SumOf236 And SumOf236 < Exclude Then
If numLargestValue = SumOf236 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 236"
Else: numLargestDay = 1: strDays = "236": End If: numLargestValue = SumOf236
End If
If numLargestValue <= SumOf237 And SumOf237 < Exclude Then
If numLargestValue = SumOf237 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 237"
Else: numLargestDay = 1: strDays = "237": End If: numLargestValue = SumOf237
End If
If numLargestValue <= SumOf238 And SumOf238 < Exclude Then
If numLargestValue = SumOf238 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 238"
Else: numLargestDay = 1: strDays = "238": End If: numLargestValue = SumOf238
End If
If numLargestValue <= SumOf239 And SumOf239 < Exclude Then
If numLargestValue = SumOf239 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 239"
Else: numLargestDay = 1: strDays = "239": End If: numLargestValue = SumOf239
End If
If numLargestValue <= SumOf240 And SumOf240 < Exclude Then
If numLargestValue = SumOf240 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 240"
Else: numLargestDay = 1: strDays = "240": End If: numLargestValue = SumOf240
End If
If numLargestValue <= SumOf241 And SumOf241 < Exclude Then
If numLargestValue = SumOf241 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 241"
Else: numLargestDay = 1: strDays = "241": End If: numLargestValue = SumOf241
End If
If numLargestValue <= SumOf242 And SumOf242 < Exclude Then
If numLargestValue = SumOf242 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 242"
Else: numLargestDay = 1: strDays = "242": End If: numLargestValue = SumOf242
End If
If numLargestValue <= SumOf243 And SumOf243 < Exclude Then
If numLargestValue = SumOf243 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 243"
Else: numLargestDay = 1: strDays = "243": End If: numLargestValue = SumOf243
End If
If numLargestValue <= SumOf244 And SumOf244 < Exclude Then
If numLargestValue = SumOf244 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 244"
Else: numLargestDay = 1: strDays = "244": End If: numLargestValue = SumOf244
End If
If numLargestValue <= SumOf245 And SumOf245 < Exclude Then
If numLargestValue = SumOf245 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 245"
Else: numLargestDay = 1: strDays = "245": End If: numLargestValue = SumOf245
End If
If numLargestValue <= SumOf246 And SumOf246 < Exclude Then
If numLargestValue = SumOf246 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 246"
Else: numLargestDay = 1: strDays = "246": End If: numLargestValue = SumOf246
End If
If numLargestValue <= SumOf247 And SumOf247 < Exclude Then
If numLargestValue = SumOf247 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 247"
Else: numLargestDay = 1: strDays = "247": End If: numLargestValue = SumOf247
End If
If numLargestValue <= SumOf248 And SumOf248 < Exclude Then
If numLargestValue = SumOf248 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 248"
Else: numLargestDay = 1: strDays = "248": End If: numLargestValue = SumOf248
End If
If numLargestValue <= SumOf249 And SumOf249 < Exclude Then
If numLargestValue = SumOf249 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 249"
Else: numLargestDay = 1: strDays = "249": End If: numLargestValue = SumOf249
End If
If numLargestValue <= SumOf250 And SumOf250 < Exclude Then
If numLargestValue = SumOf250 Then
numLargestDay = numLargestDay + 1: strDays = strDays & " 250"
Else: numLargestDay = 1: strDays = "250": End If: numLargestValue = SumOf250
End If
If Day_Select = "Day_27" Then
Value_27 = numLargestValue
Day_27 = numLargestDay
Days_27 = strDays
Total_Count = Count
End If
If Day_Select = "Day_26" Then
Value_26 = numLargestValue
Day_26 = numLargestDay
Days_26 = strDays
End If
If Day_Select = "Day_25" Then
Value_25 = numLargestValue
Day_25 = numLargestDay
Days_25 = strDays
End If
If Day_Select = "Day_24" Then
Value_24 = numLargestValue
Day_24 = numLargestDay
Days_24 = strDays
End If
If Day_Select = "Day_23" Then
Value_23 = numLargestValue
Day_23 = numLargestDay
Days_23 = strDays
End If
If Day_Select = "Day_22" Then
Value_22 = numLargestValue
Day_22 = numLargestDay
Days_22 = strDays
End If
If Day_Select = "Day_21" Then
Value_21 = numLargestValue
Day_21 = numLargestDay
Days_21 = strDays
End If
If Day_Select = "Day_20" Then
Value_20 = numLargestValue
Day_20 = numLargestDay
Days_20 = strDays
End If
If Day_Select = "Day_19" Then
Value_19 = numLargestValue
Day_19 = numLargestDay
Days_19 = strDays
End If
If Day_Select = "Day_18" Then
Value_18 = numLargestValue
Day_18 = numLargestDay
Days_18 = strDays
End If
If Day_Select = "Day_17" Then
Value_17 = numLargestValue
Day_17 = numLargestDay
Days_17 = strDays
End If
If Day_Select = "Day_16" Then
Value_16 = numLargestValue
Day_16 = numLargestDay
Days_16 = strDays
End If
If Day_Select = "Day_15" Then
Value_15 = numLargestValue
Day_15 = numLargestDay
Days_15 = strDays
End If
If Day_Select = "Day_14" Then
Value_14 = numLargestValue
Day_14 = numLargestDay
Days_14 = strDays
End If
If Day_Select = "Day_13" Then
Value_13 = numLargestValue
Day_13 = numLargestDay
Days_13 = strDays
End If
If Day_Select = "Day_12" Then
Value_12 = numLargestValue
Day_12 = numLargestDay
Days_12 = strDays
End If
If Day_Select = "Day_11" Then
Value_11 = numLargestValue
Day_11 = numLargestDay
Days_11 = strDays
End If
If Day_Select = "Day_10" Then
Value_10 = numLargestValue
Day_10 = numLargestDay
Days_10 = strDays
End If
If Day_Select = "Day_9" Then
Value_9 = numLargestValue
Day_9 = numLargestDay
Days_9 = strDays
End If
If Day_Select = "Day_8" Then
Value_8 = numLargestValue
Day_8 = numLargestDay
Days_8 = strDays
End If
If Day_Select = "Day_7" Then
Value_7 = numLargestValue
Day_7 = numLargestDay
Days_7 = strDays
End If
If Day_Select = "Day_6" Then
Value_6 = numLargestValue
Day_6 = numLargestDay
Days_6 = strDays
End If
If Day_Select = "Day_5" Then
Value_5 = numLargestValue
Day_5 = numLargestDay
Days_5 = strDays
End If
If Day_Select = "Day_4" Then
Value_4 = numLargestValue
Day_4 = numLargestDay
Days_4 = strDays
End If
If Day_Select = "Day_3" Then
Value_3 = numLargestValue
Day_3 = numLargestDay
Days_3 = strDays
End If
If Day_Select = "Day_2" Then
Value_2 = numLargestValue
Day_2 = numLargestDay
Days_2 = strDays
End If
If Day_Select = "Day_1" Then
Value_1 = numLargestValue
Day_1 = numLargestDay
Days_1 = strDays
End If
End Sub


Microsoft ISV Community Center Forums3  
 
 
spotty





PostPosted: Visual Basic for Applications (VBA), Help with largest values and counts of those values. Top

A couple of questions.

Is this written using the VB express Product As you mention Access

You say you have a Cross tab Query - which should still produce a dataset that you can use in VB express. I dont see the dataset in any of this code.

The hardcoding of everything is quite frankly a nightmare to maintain and you should seriously look into writing some functions and calling using a looping construct such as a for next loop


 
 
JRV2





PostPosted: Visual Basic for Applications (VBA), Help with largest values and counts of those values. Top

We are using MS Access 2000 and are simply using VB within the application itself. We initially tried a loop but had problems with the recognition of the data object. We ran a cross tab to pull the dates as a header column which when we went to create a loop to pull the largest value Access (VB) didn't recognize the name of the field or the value to display it on the screen therefore had to hard code it. If you can recommend a way to do a loop it would be greately appreciated. We have 250 fields that we need something to start with the first number and compare the value to the second, write the largest in a field then compare that number to the 3rd etc all the way through 250 #s. Then from that count how many instances of the largest number is on the screen. Then show which days they fall on. Our current fields are sumof1, sumof2 through SumOf250. Could our naming convention be the problem
 
 
DMan1





PostPosted: Visual Basic for Applications (VBA), Help with largest values and counts of those values. Top

Access (VB) didn't recognize the name of the field or the value to display it on the screen therefore had to hard code it.

Time Out!!!

If the names are legal (Access Allowed you to name the field XYZ) then VB can communicate those field names to Access. The secret is including square brakets around the field names. You also have the capablility to get field info by ordinal position rather than name...here is some psuedo code for your loop:

MyCommandObject.Text = "NameOfCrossTabQuery"

MyCOmmandObject.CommandType=TableDirect (or Stored procedure if you need to pass values to your query)

MyReader = MyCOmmandObject.ExecuteReader

While MyReader.Read

For OrdinalPosition as integer = 0 to MYreader.FieldCount -1

Dim TheFieldValue = MyReader(OrdinalPosition)

.....More Logic here for field comparisons...

Next

Loop

That loop willl take you through every field of every record returned by your ExecuteReader Method...

HTH



 
 
spotty





PostPosted: Visual Basic for Applications (VBA), Help with largest values and counts of those values. Top

You say you are using the VB inside Access. These forums are for VB.NET questions.

If your using the VB within Access then this is VBA (Visual Basic for Applications) which is a very different product from VB.NET and there are some other locations where you will get a quicker and better response to your VBA questions.

So your question is off topic for this forum.

Dman1 is correct in his advice but I would really consider the alternative locations for posting your Access VBA Questions.

You may find more assistance in following which specifically deals with MS Office development.

The VBA Forum

http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=74&SiteID=1

Office Automation: office.developer.automation newsgroup

http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US

Or the Office Newgroups

http://www.microsoft.com/office/community/en-us/default.mspx d=1


Hope that helps....