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.

JSDJSD

Exceler C
  • Unido

  • Última visita

  1. Sube un archivo con tan solo una hoja en la que muestres el resultado esperado
  2. Sube un ejemplo con 3 o 4 apuntes y que aparezcan tal y como quieres que se muestren
  3. Podrías compartir tu solucion
  4. Prueba ahora RCI PRUEBA2.xlsm
  5. Tal y como tienes tu código hace lo siguiente, que es lo que necesitas?
  6. El archivo RCI PRUEBA2.xlsm
  7. Private Sub ComboBox1_Change() Dim hoja As Worksheet Dim fila As Long Dim ultimaFila As Long Dim columnas() As Variant Dim i, ii As Integer Dim codigo As String Dim encontrado As Boolean Set hoja = ThisWorkbook.Sheets("MATRIZ1") codigo = ComboBox1.Value ' Si ComboBox1 está vacío If ComboBox1.Value = "" Then UserForm_Initialize Exit Sub End If ' Si ComboBox1 tiene un valor (código) encontrado = False With ListBox1 ' Limpiar ListBox .RowSource = "" ' Definir ColumnCount para el ListBox .ColumnCount = 6 ' 6 columnas (B, C, D, E, F, M) ' Columnas específicas: B, C, D, E, F, M (números de columna) columnas = Array(2, 3, 4, 5, 6, 13) .ColumnWidths = "70;90;90;90;90;90;0;0;0;0;0;0;0;0" .ColumnHeads = False ' Agregar la cabecera al ListBox (desde la fila 4, columnas B, C, D, E, F, M) .AddItem hoja.Cells(4, columnas(0)).Value ' Columna B For ii = 1 To UBound(columnas) .List(0, ii) = hoja.Cells(4, columnas(ii)).Value ' Añadir encabezados de las otras columnas Next ii ' Determinar última fila con datos en la columna B ultimaFila = hoja.Cells(hoja.Rows.Count, "B").End(xlUp).Row ' Recorrer desde la fila 5 hacia abajo For fila = 5 To ultimaFila If hoja.Cells(fila, 2).Value = codigo Then ' Columna B encontrado = True ' Añadir nueva fila al ListBox (empieza en la segunda fila del ListBox) .AddItem hoja.Cells(fila, columnas(0)).Value ' Columna B For i = 1 To UBound(columnas) ' Asegurarse de que se estén agregando todos los valores correctamente .List(Me.ListBox1.ListCount - 1, i) = hoja.Cells(fila, columnas(i)).Value ' Rellenar las otras columnas Next i End If Next fila End With If Not encontrado Then MsgBox "No se encontró el código en la hoja.", vbInformation End If End Sub
  8. Mañana te lo miro
  9. RCI PRUEBA1..xlsm
  10. Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' Asegurarnos de que solo ajustamos las filas a partir de la fila 5 If Not Intersect(Target, Me.Rows("5:" & Me.Rows.Count)) Is Nothing Then Me.Rows("5:" & Me.Rows.Count).AutoFit End If End Sub

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.