Anda di halaman 1dari 17

'Abril semana 1

'If ComboBox1.Value = "Abril" And ComboBox2.Value = "Semana 1" Then


Dim v1 As Long
v1 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A3"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B3") = v1

Dim v2 As Long
v2 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A4"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B4") = v2

Dim v3 As Long
v3 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A5"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B5") = v3

Dim v4 As Long
v4 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A6"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B6") = v4

Dim v5 As Long
v5 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A7"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B7") = v5

Dim v6 As Long
v6 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A8"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B8") = v6

Dim v7 As Long
v7 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A9"), Sheets("Reporte de
Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B9") = v7

Dim v8 As Long
v8 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A10"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B10") = v8

Dim v9 As Long
v9 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A11"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B11") = v9

Dim v10 As Long


v10 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A12"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B12") = v10

Dim v11 As Long

v11 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas


Chasis").Range("P2:P999"), Sheets("Abril").Range("A13"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B13") = v11

Dim v12 As Long


v12 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A14"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B14") = v12

Dim v13 As Long


v13 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A15"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B15") = v13

Dim v14 As Long


v14 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A16"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B16") = v14

Dim v15 As Long


v15 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A17"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B17") = v15

Dim v16 As Long


v16 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A18"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")

Sheets("Abril").Range("B18") = v16

Dim v17 As Long


v17 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Sheets("Abril").Range("A19"), Sheets("Reporte
de Ventas Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "1")
Sheets("Abril").Range("B19") = v17
'Else
'Sheets("Abril").Range("B3:B19") = "0"
'End If

'Abril semana 2
'If ComboBox1.Value = "Abril" And ComboBox2.Value = "Semana 2" Then
Dim b1 As Long
b1 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A23"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B23") = b1

Dim b2 As Long
b2 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A24"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B24") = b2

Dim b3 As Long
b3 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A25"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B25") = b1

Dim b4 As Long

b4 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A26"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B26") = b4

Dim b5 As Long
b5 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A27"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B27") = b5

Dim b6 As Long
b6 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A28"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B28") = b6

Dim b7 As Long
b7 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A29"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B29") = b7

Dim b8 As Long
b8 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A30"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B30") = b8

Dim b9 As Long
b9 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A31"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")

Sheets("Abril").Range("B31") = b9

Dim b10 As Long


b10 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A32"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B32") = b10

Dim b11 As Long


b11 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A33"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B33") = b11

Dim b12 As Long


b12 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A34"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B34") = b12

Dim b13 As Long


b13 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A35"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B35") = b13

Dim b14 As Long


b14 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A36"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B36") = b14

Dim b15 As Long

b15 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas


Chasis").Range("P2:P999"), Range("A37"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B37") = b15

Dim b16 As Long


b16 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A38"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B38") = b16

Dim b17 As Long


b17 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A39"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "2")
Sheets("Abril").Range("B39") = b17
'Else
'Sheets("Abril").Range("B23:B39") = "0"
'End If

'Abril semana 3
'If ComboBox1.Value = "Abril" And ComboBox2.Value = "Semana 3" Then
Dim ba1 As Long
ba1 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A43"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B43") = ba1

Dim ba2 As Long


ba2 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A44"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B44") = ba2

Dim ba3 As Long


ba3 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A45"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B45") = ba1

Dim ba4 As Long


ba4 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A46"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B46") = ba4

Dim ba5 As Long


ba5 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A47"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B47") = ba5

Dim ba6 As Long


ba6 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A48"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B48") = ba6

Dim ba7 As Long


ba7 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A49"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B49") = ba7

Dim ba8 As Long

ba8 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas


Chasis").Range("P2:P999"), Range("A50"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B50") = ba8

Dim ba9 As Long


ba9 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A51"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B51") = ba9

Dim ba10 As Long


ba10 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A52"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B52") = ba10

Dim ba11 As Long


ba11 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A53"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B53") = ba11

Dim ba12 As Long


ba12 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A54"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B54") = ba12

Dim ba13 As Long


ba13 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A55"), Sheets("Reporte de Ventas

Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas


Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B55") = ba13

Dim ba14 As Long


ba14 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A56"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B56") = ba14

Dim ba15 As Long


ba15 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A57"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B57") = ba15

Dim ba16 As Long


ba16 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A58"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B58") = ba16

Dim ba17 As Long


ba17 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A59"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "3")
Sheets("Abril").Range("B59") = ba17

'Else
'Sheets("Abril").Range("B43:B59") = "0"
'End If

'Abril semana 4
'If ComboBox1.Value = "Abril" And ComboBox2.Value = "Semana 4" Then
Dim bal1 As Long
bal1 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A63"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B63") = bal1

Dim bal2 As Long


bal2 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A64"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B64") = bal2

Dim bal3 As Long


bal3 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A65"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B65") = bal1

Dim bal4 As Long


bal4 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A66"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B66") = bal4

Dim bal5 As Long


bal5 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A67"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B67") = bal5

Dim bal6 As Long

bal6 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas


Chasis").Range("P2:P999"), Range("A68"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B68") = bal6

Dim bal7 As Long


bal7 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A69"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B69") = bal7

Dim bal8 As Long


bal8 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A70"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B70") = bal8

Dim bal9 As Long


bal9 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A71"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B71") = bal9

Dim bal10 As Long


bal10 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A72"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B72") = bal10

Dim bal11 As Long


bal11 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A73"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")

Sheets("Abril").Range("B73") = bal11

Dim bal12 As Long


bal12 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A74"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B74") = bal12

Dim bal13 As Long


bal13 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A75"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B75") = bal13

Dim bal14 As Long


bal14 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A76"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B76") = bal14

Dim bal15 As Long


bal15 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A77"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B77") = bal15

Dim bal16 As Long


bal16 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas
Chasis").Range("P2:P999"), Range("A78"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B78") = bal16

Dim bal17 As Long

bal17 = Application.WorksheetFunction.CountIfs(Sheets("Reporte de Ventas


Chasis").Range("P2:P999"), Range("A79"), Sheets("Reporte de Ventas
Chasis").Range("C2:C999"), "4", Sheets("Reporte de Ventas
Chasis").Range("D2:D999"), "4")
Sheets("Abril").Range("B79") = bal17

'Else
'Sheets("Abril").Range("B63:B79") = "0"
'End If
Unload UserForm1

'primera semana Abril

Sheets("Abril").Range("B20").Formula = "=SUM(B3:B19)"
Sheets("Abril").Range("C3").Formula = "=SUM(B3/B20)"
Sheets("Abril").Range("C4").Formula = "=SUM(B4/B20)"
Sheets("Abril").Range("C5").Formula = "=SUM(B5/B20)"
Sheets("Abril").Range("C6").Formula = "=SUM(B6/B20)"
Sheets("Abril").Range("C7").Formula = "=SUM(B7/B20)"
Sheets("Abril").Range("C8").Formula = "=SUM(B8/B20)"
Sheets("Abril").Range("C9").Formula = "=SUM(B9/B20)"
Sheets("Abril").Range("C10").Formula = "=SUM(B10/B20)"
Sheets("Abril").Range("C11").Formula = "=SUM(B11/B20)"
Sheets("Abril").Range("C12").Formula = "=SUM(B12/B20)"
Sheets("Abril").Range("C13").Formula = "=SUM(B13/B20)"
Sheets("Abril").Range("C14").Formula = "=SUM(B14/B20)"
Sheets("Abril").Range("C15").Formula = "=SUM(B15/B20)"
Sheets("Abril").Range("C16").Formula = "=SUM(B16/B20)"
Sheets("Abril").Range("C17").Formula = "=SUM(B17/B20)"
Sheets("Abril").Range("C18").Formula = "=SUM(B18/B20)"
Sheets("Abril").Range("C19").Formula = "=SUM(B19/B20)"

Sheets("Abril").Range("C3:C19").NumberFormat = "0.00%"

'End If

'segunda semana Abril

Sheets("Abril").Range("B40").Formula = "=SUM(B23:B39)"
Sheets("Abril").Range("C23").Formula = "=SUM(B23/B40)"
Sheets("Abril").Range("C24").Formula = "=SUM(B24/B40)"
Sheets("Abril").Range("C25").Formula = "=SUM(B25/B40)"
Sheets("Abril").Range("C26").Formula = "=SUM(B26/B40)"
Sheets("Abril").Range("C27").Formula = "=SUM(B27/B40)"
Sheets("Abril").Range("C28").Formula = "=SUM(B28/B40)"
Sheets("Abril").Range("C29").Formula = "=SUM(B29/B40)"
Sheets("Abril").Range("C30").Formula = "=SUM(B30/B40)"
Sheets("Abril").Range("C31").Formula = "=SUM(B31/B40)"
Sheets("Abril").Range("C32").Formula = "=SUM(B32/B40)"
Sheets("Abril").Range("C33").Formula = "=SUM(B33/B40)"
Sheets("Abril").Range("C34").Formula = "=SUM(B34/B40)"
Sheets("Abril").Range("C35").Formula = "=SUM(B35/B40)"
Sheets("Abril").Range("C36").Formula = "=SUM(B36/B40)"
Sheets("Abril").Range("C37").Formula = "=SUM(B37/B40)"
Sheets("Abril").Range("C38").Formula = "=SUM(B38/B40)"
Sheets("Abril").Range("C39").Formula = "=SUM(B39/B40)"

Sheets("Abril").Range("C22:C39").NumberFormat = "0.00%"

'tercera semana Abril

Sheets("Abril").Range("B60").Formula = "=SUM(B43:B59)"
Sheets("Abril").Range("C43").Formula = "=SUM(B43/B60)"
Sheets("Abril").Range("C44").Formula = "=SUM(B44/B60)"

Sheets("Abril").Range("C45").Formula = "=SUM(B45/B60)"
Sheets("Abril").Range("C46").Formula = "=SUM(B46/B60)"
Sheets("Abril").Range("C47").Formula = "=SUM(B47/B60)"
Sheets("Abril").Range("C48").Formula = "=SUM(B48/B60)"
Sheets("Abril").Range("C49").Formula = "=SUM(B49/B60)"
Sheets("Abril").Range("C50").Formula = "=SUM(B50/B60)"
Sheets("Abril").Range("C51").Formula = "=SUM(B51/B60)"
Sheets("Abril").Range("C52").Formula = "=SUM(B52/B60)"
Sheets("Abril").Range("C53").Formula = "=SUM(B53/B60)"
Sheets("Abril").Range("C54").Formula = "=SUM(B54/B60)"
Sheets("Abril").Range("C55").Formula = "=SUM(B55/B60)"
Sheets("Abril").Range("C56").Formula = "=SUM(B56/B60)"
Sheets("Abril").Range("C57").Formula = "=SUM(B57/B60)"
Sheets("Abril").Range("C58").Formula = "=SUM(B58/B60)"
Sheets("Abril").Range("C59").Formula = "=SUM(B59/B60)"
Sheets("Abril").Range("C42:C59").NumberFormat = "0.00%"

'cuarta semana Abril


Sheets("Abril").Range("B80").Formula = "=SUM(B63:B79)"
Sheets("Abril").Range("C63").Formula = "=SUM(B63/B80)"
Sheets("Abril").Range("C64").Formula = "=SUM(B64/B80)"
Sheets("Abril").Range("C65").Formula = "=SUM(B65/B80)"
Sheets("Abril").Range("C66").Formula = "=SUM(B66/B80)"
Sheets("Abril").Range("C67").Formula = "=SUM(B67/B80)"
Sheets("Abril").Range("C68").Formula = "=SUM(B68/B80)"
Sheets("Abril").Range("C69").Formula = "=SUM(B69/B80)"
Sheets("Abril").Range("C70").Formula = "=SUM(B70/B80)"
Sheets("Abril").Range("C71").Formula = "=SUM(B71/B80)"
Sheets("Abril").Range("C72").Formula = "=SUM(B72/B80)"
Sheets("Abril").Range("C73").Formula = "=SUM(B73/B80)"
Sheets("Abril").Range("C74").Formula = "=SUM(B74/B80)"
Sheets("Abril").Range("C75").Formula = "=SUM(B75/B80)"

Sheets("Abril").Range("C76").Formula = "=SUM(B76/B80)"
Sheets("Abril").Range("C77").Formula = "=SUM(B77/B80)"
Sheets("Abril").Range("C78").Formula = "=SUM(B78/B80)"
Sheets("Abril").Range("C79").Formula = "=SUM(B79/B80)"

Sheets("Abril").Range("C62:C79").NumberFormat = "0.00%"