Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub teste()
- Dim Preco, MaxPreco, MaxCu, cu, Quantidade, Variacao, Dolar, MDR As Double
- Dim linha As Integer
- Dim PrecoIndex, CuIndex, QuantidadeIndex as Double
- Linha = 4
- Preco = 40
- MaxPreco = 100
- cu = 15
- Quantidade = 50
- Variacao = 3
- MaxCu = MaxPreco
- Dolar = 3.5
- MDR = 2
- For PrecoIndex = Preco To MaxPreco
- For CuIndex = cu To MaxCu
- For QuantidadeIndex = Quantidade To Quantidade + Variacao
- Cells(linha, 4).Value = PrecoIndex
- Cells(linha, 5).Value = CuIndex
- Cells(linha, 6).Value = QuantidadeIndex
- 'ADICIONAR DOLAR
- 'ADICIONAR MDR
- Linha = Linha + 1
- Next
- Dolar = Dolar + 0.1
- if Dolar > 4.0 then
- Dolar = 3.5
- End If
- MDR = MDR + 1
- if MDR > 4 then
- MDR = 2
- end If
- Next
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement