Totalizar con varias condiciones en Excel

Dante

Quisiera hacerte una consulta más para concluir esta saga.

Se trata de totalizar teniendo en cuenta varias condiciones y lo explico en el Word adjunto

Te agradezco de antemano la ayuda que puedas darme y te reenvío por mail los ejemplos

Un abrazo

1 respuesta

Respuesta
1

H   o l a:

Envíame los ejemplos claros y completos.

Sal u dos

Te anexo la macro para totalizar:

'Art en Dev Estimadas
    Set h1 = Sheets("DE")
    Set h2 = Sheets("INFORMES")
    u = h2.Range("B" & Rows.Count).End(xlUp).Row
    If u < 18 Then u = 18
    h2.Range("B18:B" & u).ClearContents
    h2.Range("D18:D" & u).ClearContents
    k = 18
    Set r = h1.Columns("N")
    Set b = r.Find(h2.Range("B4"), lookat:=xlWhole)
    If Not b Is Nothing Then
        ncell = b.Address
        Do
            existe = False
            For j = 18 To h2.Range("B" & Rows.Count).End(xlUp).Row
                If h2.Cells(j, "D") = h1.Cells(b.Row, "E") Then
                    existe = True
                    k = j
                    Exit For
                End If
            Next
            '
            If existe Then
                h2.Cells(k, "B") = h2.Cells(k, "B") + h1.Cells(b.Row, "Q")
            Else
                k = h2.Range("B" & Rows.Count).End(xlUp).Row + 1
                h2.Cells(k, "B") = h1.Cells(b.Row, "Q")
                h2.Cells(k, "D") = h1.Cells(b.Row, "E")
            End If
            Set b = r.FindNext(b)
        Loop While Not b Is Nothing And b.Address <> ncell
    End If

sal u dos

¡Gracias DANTE!

Espectacular! lo adapte al ejemplo siguiente y concluí esta etapa!

Es excelente y te lo debo a Vos!

Abrazo grande.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas