Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
#56967
Código: Selecionar todos
Public Sub Concatenar()
    Dim rngOrig1 As Range
    Dim rngDest1 As Range
    Dim rngLin As Range, rngCel As Range
    Dim bytCont As Byte, lngColor As Long
    
    With Plan1
        Set rngOrig1 = .Range("U9:Y35")
        Set rngOrig2 = .Range("AA9:AE35")
        
        .Range("H9:K35").ClearContents
        For Each rngLin In rngOrig1.Rows
            bytCont = 0
            For Each rngCel In rngLin.Cells
                If rngCel.Value = "x" Then
                    bytCont = bytCont + 1
                    lngColor = rngCel.Font.Color
                End If
            Next rngCel
            If bytCont > 0 Then
                .Cells(rngLin.Row, 8).Value2 = "x"
                .Cells(rngLin.Row, 8).Font.Color = lngColor
            End If
        Next rngLin
        
        For Each rngLin In rngOrig2.Rows
            bytCont = 0
            For Each rngCel In rngLin.Cells
                If rngCel.Value = "x" Then
                    bytCont = bytCont + 1
                    lngColor = rngCel.Font.Color
                End If
            Next rngCel
            If bytCont > 0 Then
                .Cells(rngLin.Row, 11).Value2 = "x"
                .Cells(rngLin.Row, 11).Font.Color = lngColor
            End If
        Next rngLin
    End With
End Sub
Você não está autorizado a ver ou baixar esse anexo.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord