Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copiar título al delimitar columnas

publicado

Hola que tal

Ando buscando ayuda con el siguiente archivo; en la hoja principal (Simple Order) tengo la columna AF y necesito delimitar por cada numero de parte (esta parte de la macro ya la hice en el archivo) pero no se como copiar el titulo (AF1) hasta la ultima columna que me haya dado la macro, todos los dias la cantidad de los numeros de parte cambian y que considere la ultima columna y al final agregue dos titulos mas: Notes y Status. Adjunto el ejemplo de como queda manualmente, cualquier ayuda es bienvenida y gracias de antemano.

example.xlsm

Featured Replies

publicado

@vinzent , sustituye tu código con el siguiente (o copia solo la parte nueva):
 

Sub SepararColumnas()
Dim uC&, uF&
        Sheets("Simple Order").Select
        Range("AF1").Value = "Part_Number"
        Columns("AF:AF").Select
        Selection.TextToColumns Destination:=Range("AF1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
        Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
        :=Array(1, 1), TrailingMinusNumbers:=True

'CONTAMOS FILAS Y COLUMNAS FINALES'
ActiveSheet.UsedRange.Select
uC = Selection.Columns.Count
uF = Selection.Rows.Count

'PASAMOS EL TÍTULO Y AJUSTAMOS ANCHO DE COLUMNA'
Range(Cells(1, "Ag"), Cells(1, uC)).Value = "Part_Number"
Range(Cells(1, "Ag"), Cells(uF, uC)).Columns.AutoFit

'PASAMOS NOMBRE A LAS OTRAS 2 COLUMNAS'
Cells(1, uC + 1) = "Notes"
Cells(1, uC + 2) = "Status"
End Sub

 

Editado el por Haplox

publicado
  • Autor
Hace 5 minutos , Haplox dijo:

@vinzent , sustituye tu código con el siguiente (o copia solo la parte nueva):
 


Sub SepararColumnas()
Dim uC&, uF&
        Sheets("Simple Order").Select
        Range("AF1").Value = "Part_Number"
        Columns("AF:AF").Select
        Selection.TextToColumns Destination:=Range("AF1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
        Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
        :=Array(1, 1), TrailingMinusNumbers:=True

'CONTAMOS FILAS Y COLUMNAS FINALES'
ActiveSheet.UsedRange.Select
uC = Selection.Columns.Count
uF = Selection.Rows.Count

'PASAMOS EL TÍTULO Y AJUSTAMOS ANCHO DE COLUMNA'
Range(Cells(1, "Ag"), Cells(1, uC)).Value = "Part_Number"
Range(Cells(1, "Ag"), Cells(uF, uC)).Columns.AutoFit

'PASAMOS NOMBRE A LAS OTRAS 2 COLUMNAS'
Cells(1, uC + 1) = "Notes"
Cells(1, uC + 2) = "Status"
End Sub

 

Gracias, ya lo probe y funciona a la perfección.

publicado
Hace 2 minutos , vinzent dijo:

Gracias, ya lo probe y funciona a la perfección.

Pues de nada hombre... :)

Archivado

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.