Saltar al contenido

organizar informacion

publicado

buenos días, 

bendiciones !

serian tan amables de aconsejarme para poder organizar la información de una manera mas rápido, ya que todos los días tengo que hacerlo manual y me gasto mucho tiempo organizando. 

les agradezco mucho su consejo

como quiero que quede :

image.thumb.png.67f6330080b492736d9c485ed8b6d72f.png

 

así se exporta el informe:

 

image.thumb.png.feb70aa69a9b9d518154eec2874bd71f.png 

informe empaque.xlsx

Featured Replies

publicado
Private Sub CommandButton1_Click(): Application.ScreenUpdating = False
    With Hoja2
        If .Range("A" & Rows.Count).End(xlUp).Row > 1 Then
            .Range("A2:J" & .Range("A" & Rows.Count).End(xlUp).Row).ClearContents
        End If
    End With
    
    With Hoja1
        ufh1 = .Range("J" & Rows.Count).End(xlUp).Row
        For Each buscado In .Range("A3:K" & ufh1)
            ufh2 = Hoja2.Range("A" & Rows.Count).End(xlUp).Row
            Select Case buscado.Value
                Case "cliente:"
                    Hoja2.Cells(ufh2 + 1, 1).Value = .Cells(buscado.Row, 2).Value
                Case "Proyecto:"
                    Hoja2.Cells(ufh2, 2).Value = .Cells(buscado.Row, 4).Value
                Case "Orden:"
                    Hoja2.Cells(ufh2, 3).Value = .Cells(buscado.Row, 8).Value
                Case "Empaque #:"
                    Hoja2.Cells(ufh2, 9).Value = .Cells(buscado.Row, 11).Value
                Case "LOTE"
                    Hoja2.Cells(ufh2, 4).Value = .Cells(buscado.Row + 2, 1).Value
                Case "ITEM"
                    Hoja2.Cells(ufh2, 5).Value = .Cells(buscado.Row + 2, 2).Value
                Case "CANTIDAD"
                    Hoja2.Cells(ufh2, 6).Value = .Cells(buscado.Row + 2, 3).Value
                Case "ANCHO"
                    Hoja2.Cells(ufh2, 7).Value = .Cells(buscado.Row + 2, 5).Value
                Case "LARGO"
                    Hoja2.Cells(ufh2, 8).Value = .Cells(buscado.Row + 2, 7).Value
                Case "Fecha Empaque"
                    Hoja2.Cells(ufh2, 10).Value = .Cells(buscado.Row, 10).Value
            End Select
        Next buscado
    End With
End Sub

 

informe empaque.xlsm

publicado
  • Autor

buenos días.

 

un genio!

dios blinde su vida y su conocimiento.

 

muchas gracias!

 

publicado
  • Autor

buenas,

no trae todos los datos.

 

hoja. informe detallado empaques:

 

image.thumb.png.0ef72d9140b3e8265eafa5001e155528.png

 

 

asi lo trajo: 

 

image.thumb.png.ef9b4de7b5b9dbe2b317bbf717e06ef6.png

la orden tiene 6 registros. solo trajo el primero.

 

gracias!

publicado

Correcto, no tuve en cuenta los datos subidos, solamente me fije en los dos primeros clientes, en cuanto pueda te lo modifico

publicado
  • Autor

gracias!

publicado
Private Sub CommandButton1_Click(): Application.ScreenUpdating = False

    With Hoja2
        If .Range("A" & .Rows.Count).End(xlUp).Row > 1 Then
            .Range("A2:J" & .Range("A" & .Rows.Count).End(xlUp).Row).ClearContents
        End If
    End With

    With Hoja1
        ufh1 = .Range("J" & .Rows.Count).End(xlUp).Row
        For Each buscado In .Range("A3:A" & ufh1)
            ufh2 = Hoja2.Range("A" & Hoja2.Rows.Count).End(xlUp).Row + 1
            Select Case buscado.Value
                Case "cliente:"
                    cliente = .Cells(buscado.Row, 2).Value
                    proyecto = .Cells(buscado.Row, 4).Value
                    orden = .Cells(buscado.Row, 8).Value
                    empaque = .Cells(buscado.Row, 11).Value

                Case "LOTE"
                    i = 0
                    Do Until .Cells(buscado.Row + i + 2, 1).Value = "TOTALES" And .Cells(buscado.Row + i + 2, 2).Value = ""
                        Hoja2.Cells(ufh2 + i, 1).Value = cliente
                        Hoja2.Cells(ufh2 + i, 2).Value = proyecto
                        Hoja2.Cells(ufh2 + i, 3).Value = orden
                        Hoja2.Cells(ufh2 + i, 9).Value = empaque
                        Hoja2.Cells(ufh2 + i, 4).Value = .Cells(buscado.Row + 2 + i, 1).Value
                        Hoja2.Cells(ufh2 + i, 5).Value = .Cells(buscado.Row + 2 + i, 2).Value
                        Hoja2.Cells(ufh2 + i, 6).Value = .Cells(buscado.Row + 2 + i, 3).Value
                        Hoja2.Cells(ufh2 + i, 7).Value = .Cells(buscado.Row + 2 + i, 5).Value
                        Hoja2.Cells(ufh2 + i, 8).Value = .Cells(buscado.Row + 2 + i, 7).Value
                        i = i + 1
                    Loop

                Case "Fecha Empaque"
                    fecha = .Cells(buscado.Row, 10).Value
                    i = 1
                    Do Until Hoja2.Cells(ufh2 - i, 10).Value <> "" Or ufh2 - i < 2
                        Hoja2.Cells(ufh2 - i, 10).Value = fecha
                        i = i + 1
                    Loop
            End Select
        Next buscado
    End With
End Sub

 

informe empaque.xlsm

publicado
  • Autor

buenas,

 

muy agradecido con su ayuda.

mucha admiración y respeto.!

saludos!

publicado
  • Autor

es lo que buscaba. muchas gracias estimado!

 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.