Generar reporte de nombres con una base de datos en el excel con macros

Dante Amor para Dante Amor mi pregunta por favor si hay una macro que me permita generar un reporte de nombres como en el archivo excel que adjunto a continuación, con un a base de datos hecha en el excel, este reporte me verificara si el nombre es repetitivo. Por favor dejo el archivo con todos los detalles. Y procedimientos . Agradecería mucha su ayuda maestro.

https://www.dropbox.com/s/fuwse5z2x3gai9y/REPORTED%20E%20NOMBRES.xlsm?dl=0 

https://www.dropbox.com/home?preview=REPORTED+E+NOMBRES.xlsm 

1 respuesta

Respuesta
1

H o l a:

No puedo descargar archivos de dropbox, podrías enviarme los archivos a mi correo.

Sal u dos

Dante Amor por favor me darías tu correo para enviarte el archivo por favor. mi correo es [email protected]

Mi correo [email protected]

En el asunto del correo escribe tu nombre de usuario “Ivan Williams Sucuitana Ccaihuari” y el título de esta pregunta.

OK Dante Amor ya te envíe el archivo

H o l a:

Te anexo la macro

Sub GenerarReporte()
'Por.Dante Amor
    Set h1 = Sheets("DATOS")
    Set h2 = Sheets("BASE DE DATOS")
    Set h3 = Sheets("RESULTADO")
    Set h4 = Sheets("FORMATO")
    '
    h3.UsedRange.Offset(1, 0).Clear
    j = 2
    For i = 5 To h1.Range("B" & Rows.Count).End(xlUp).Row
        Set b = h2.Columns("A").Find(h1.Cells(i, "B"), lookat:=xlWhole)
        If Not b Is Nothing Then
            h1.Cells(i, "C") = "SI"
            f = b.Row
            Set b = h3.Columns("C").Find(h1.Cells(i, "B"), lookat:=xlWhole)
            If Not b Is Nothing Then
                h4.Range("B2:C4").Copy h3.Cells(j, "B")
                h3.Cells(j, "B") = h1.Cells(i, "A")                           'item
                h3.Cells(j, "C") = h1.Cells(i, "B")                           'nombre
                h3.Cells(j + 1, "C") = h2.Cells(f, "C")                       'edad
                h3.Cells(j + 2, "C") = "IDENTICO VER ITEM " & b.Offset(0, -1) 'Descripción
                h3.Cells(j + 2, "C").Interior.ColorIndex = 22
                j = j + 4
            Else
                h4.Range("B2:C5").Copy h3.Cells(j, "B")
                h3.Cells(j, "B") = h1.Cells(i, "A")                           'item
                h3.Cells(j, "C") = h1.Cells(i, "B")                           'nombre
                h3.Cells(j + 1, "C") = h2.Cells(f, "C")                       'edad
                h3.Cells(j + 2, "C") = h2.Cells(f, "D")                       'descripción
                h3.Cells(j + 3, "C") = h2.Cells(f, "E")                       'condición
                j = j + 5
            End If
        Else
            h1.Cells(i, "C") = "NO EXISTE"
        End If
    Next
    MsgBox "Reporte terminado", vbInformation, "Generar Reporte"
End Sub

:)
S aludos.   D a n t e   A m o r. Recuerda valorar la respuesta. G r a c i a s
;) 

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas