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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
Sub Pays()
Combobox1.AddItem "China" 'List Index = 0
Combobox1.AddItem "France" 'List Index = 1
Combobox1.AddItem "Italy" 'List Index = 2
Combobox1.AddItem "UK" 'List Index =3
Combobox1.AddItem "India" 'List Index =4
Combobox1.AddItem "Turkey" 'List Index = 5
Combobox1.AddItem "Mexico" 'List Index = 6
Combobox1.AddItem "USA" 'List Index = 7
Combobox1.AddItem "Canada" 'List Index =8
Combobox1.AddItem "Russia" 'List Index = 9
Combobox1.AddItem "Brazil" 'List Index = 10
Combobox1.AddItem "Spain" 'List Index = 11
If Combobox1.Value = "China" Then
Worksheets("Country Data").Range("F2") = "China"
End If
If Combobox1.Value = "India" Then
Worksheets("Country Data").Range("F2") = "India"
End If
If Combobox1.Value = "France" Then
Worksheets("Country Data").Range("F2") = "France"
End If
If Combobox1.Value = "Italy" Then
Worksheets("Country Data").Range("F2") = "Italy"
End If
If Combobox1.Value = "UK" Then
Worksheets("Country Data").Range("F2") = "UK"
End If
If Combobox1.Value = "Spain" Then
Worksheets("Country Data").Range("F2") = "Spain"
End If
If Combobox1.Value = "Mexico" Then
Worksheets("Country Data").Range("F2") = "Mexico"
End If
If Combobox1.Value = "Canada" Then
Worksheets("Country Data").Range("F2") = "Canada"
End If
If Combobox1.Value = "Brazil" Then
Worksheets("Country Data").Range("F2") = "Brazil"
End If
If Combobox1.Value = "USA" Then
Worksheets("Country Data").Range("F2") = "USA"
End If
If Combobox1.Value = "Russia" Then
Worksheets("Country Data").Range("F2") = "Russia"
End If
If Combobox1.Value = "Turkey" Then
Worksheets("Country Data").Range("F2") = "Turkey"
End If
'Summary
Worksheets("Country Data").Range("M13").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!B7:R82,2,False)"
Worksheets("Country Data").Range("I13").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!T7:AJ82,2,False)"
Worksheets("Country Data").Range("K13").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!T7:AJ82,10,False)"
Worksheets("Country Data").Range("O13").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!B7:R82,10,False)"
Worksheets("Country Data").Range("M14").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!B7:R82,3,False)"
Worksheets("Country Data").Range("I14").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!T7:AJ82,3,False)"
Worksheets("Country Data").Range("K14").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!T7:AJ82,11,False)"
Worksheets("Country Data").Range("O14").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!B7:R82,11,False)"
Worksheets("Country Data").Range("M15").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!BT7:CJ84,2,False)"
Worksheets("Country Data").Range("I15").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,2,False)"
Worksheets("Country Data").Range("K15").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,18,False)"
Worksheets("Country Data").Range("M16").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!BT7:CJ84,3,False)"
Worksheets("Country Data").Range("I16").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,3,False)"
Worksheets("Country Data").Range("K16").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,19,False)"
Worksheets("Country Data").Range("M20").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!BT7:CJ84,4,False)"
Worksheets("Country Data").Range("I20").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,4,False)"
Worksheets("Country Data").Range("K20").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,20,False)"
Worksheets("Country Data").Range("M21").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!BT7:CJ84,5,False)"
Worksheets("Country Data").Range("I21").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,5,False)"
Worksheets("Country Data").Range("K21").Formula = "=VLookup(" & "F2" & ",'Data Power 08-09'!AL7:BR84,21,False)"
End Sub |
Partager