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.

REPETIR CADENA CELDA EN FILAS TANTAS VECES SE REPITA LA CADENA

publicado

Hola!!

A ver si alguien me puede ayudar con una macro, necesito transponer  los registros que están contenido en una celda que tienen un separador "|".

Pongo un ejemplo:

Inicialmente tengo esto 2 columnas:

refe  productos

A       1|2|3|4|5

B       6|7

Y quiero que la macro en cuestión me lo haga así:

refe productos

A      1

A      2

A      3

A      4

A      5

B     6TRANSPONER CADENA TANTAS VECES SE REPITA.xlsx

B     7

 

Muchas gracias de antemano.

Un saludo.

Featured Replies

publicado
Sub Transponer()
Application.ScreenUpdating = False
fila = 1
For x = 2 To Range("A" & Rows.Count).End(xlUp).Row
   cadena = Split(Range("B" & x), "|")
   For y = 0 To UBound(cadena)
      fila = fila + 1
      Range("D" & fila) = Range("A" & x)
      Range("E" & fila) = cadena(y)
   Next
Next
End Sub

 

publicado
  • Autor

Muchas gracias!!! Funciona a la perfección.

Un saludo
 

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.