Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub teste()
  2. Dim Preco, MaxPreco, cu, Quantidade, Variacao As Double
  3. Dim linha As Integer
  4.  
  5. 'Console.WriteLine("linha | preco |   cu |   quantidade")
  6.  
  7. Preco = 40
  8. Linha = 4
  9. Quantidade = 50
  10. cu = 15
  11. Variacao = 3
  12. MaxPreco = 100
  13.  
  14. For PrecoIndex as Double = Preco To MaxPreco
  15.   For CuIndex As Double = cu To PrecoIndex
  16.     For QuantidadeIndex As Double = Quantidade To Quantidade + Variacao
  17.       'Console.WriteLine("{0:D}        {1:N}     {2:N}      {3:N}", Linha, PrecoIndex, CuIndex, QuantidadeIndex)    
  18.      
  19.          Cells(linha, 4).Value = PrecoIndex
  20.     Cells(linha, 5).Value = CuIndex
  21.     Cells(linha, 6).Value = QuantidadeIndex
  22.    
  23.       Linha = Linha + 1
  24.     Next
  25.   Next  
  26. Next
  27.  
  28. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement