Ir ao conteúdo
  • Cadastre-se

Joás Lima

Membro Júnior
  • Posts

    2
  • Cadastrado em

  • Última visita

posts postados por Joás Lima

  1. Consegui!
    funciona desta forma:
     

    Sub numberlist()
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    Dim a1 As Single
    Dim b1 As Single
    Dim c1 As Single
    Dim d1 As Single
    Dim e1 As Single
    Dim f1 As Single
    Dim g1 As Single
    Dim h1 As Single
    Dim i1 As Single
    Dim j1 As Single
    Dim count As Integer
    Dim lrow As Long
    Dim lcolumn As Long

    a1 = 0
    b1 = 0
    c1 = 0
    d1 = 0
    e1 = 0
    f1 = 0
    g1 = 0
    h1 = 0
    i1 = 0
    lcolumn = 1

        
        For a1 = 0 To 2 Step 1
        For b1 = 0 To 2 Step 1
        For c1 = 0 To 2 Step 1
        For d1 = 0 To 2 Step 1
        For e1 = 0 To 2 Step 1
        For f1 = 0 To 2 Step 1
        For g1 = 0 To 2 Step 1
        For h1 = 0 To 2 Step 1
        For i1 = 0 To 2 Step 1
        lrow = Cells(Rows.count, lcolumn).End(xlUp).Row + 1
        Cells(lrow, lcolumn) = a1 & b1 & c1 & d1 & e1 & f1 & g1 & h1 & i1 & j1
        
        If lrow Mod 1000 = 0 Then
                   
            lcolumn = lcolumn + 1
            lrow = 1
            
            Else
            End If
            
        Next
        
        Next
        Next
        Next
        Next
        Next
        Next
        Next
        Next
        
        
        

    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    End Sub
     

  2. alguem ai que possa ajudar com vba?
    o problema é: quero mudar de coluna, a cada contagem de linha.
    ex.: a cada 100 linhas contadas, uma coluna.
    eu consigo mudar de linha mas nao consigo mudar de coluna.
    eis a situação do codigo:

     

    Sub numberlist()
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    Dim a1 As Single
    Dim b1 As Single
    Dim c1 As Single
    Dim d1 As Single
    Dim e1 As Single
    Dim f1 As Single
    Dim g1 As Single
    Dim h1 As Single
    Dim i1 As Single
    Dim j1 As Single
    Dim count As Integer
    Dim lrow As Long
    Dim lcolumn As Integer

    a1 = 0
    b1 = 0
    c1 = 0
    d1 = 0
    e1 = 0
    f1 = 0
    g1 = 0
    h1 = 0
    i1 = 0

        
        For a1 = 0 To 1 Step 1
        For b1 = 0 To 1 Step 1
        For c1 = 0 To 1 Step 1
        For d1 = 0 To 1 Step 1
        For e1 = 0 To 1 Step 1
        For f1 = 0 To 1 Step 1
        For g1 = 0 To 1 Step 1
        For h1 = 0 To 1 Step 1
        For i1 = 0 To 1 Step 1
        lrow = Cells(Rows.count, "A").End(xlUp).Row + 1
        Cells(lrow, "A") = a1 & b1 & c1 & d1 & e1 & f1 & g1 & h1 & i1 & j1
        
        If lrow Mod 100 = 0 Then
            Application.EnableEvents = False
            lcolumn = Range(1, Columns.count).Next(xlToRight).Column + 1
            lrow = 0
            lrow = Cells(Rows.count, Columns.count).End(xlUp).Row + 1
            Cells(lrow, "A") = a1 & b1 & c1 & d1 & e1 & f1 & g1 & h1 & i1 & j1
            Else
            End If
            
        Next
        
        Next
        Next
        Next
        Next
        Next
        Next
        Next
        Next
        
        
        
    Application.EnableEvents = True
    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    End Sub
     

     

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

 

GRÁTIS: ebook Redes Wi-Fi – 2ª Edição

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!