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.

Agregar fila y agregar formulas de la fila superior

Featured Replies

publicado

Buenas noches Edgar,

Pues adaptado a tu caso, si he entendido bien, cambiaría el CommandButton2_Click por lo siguiente:


Private Sub CommandButton2_Click()
'Agrega filas
Dim fila, filaCopiar As Variant
[I][B]On Error Resume Next[/B][/I]
Do
If fila <> Empty Then MsgBox "No es una fila válida."
fila = InputBox("Nº de fila a insertar", "Insertar filas")
If fila = vbNullString Then Exit Sub
Loop While Not IsNumeric(fila) Or fila = 0

If MsgBox("¿Realmente quiere insertar la fila " & fila & "?", _
vbOKCancel, "Confirmar procedimiento") = vbOK Then Rows(fila).Insert Shift:=xlDown
Cells(CInt(fila), 1) = (ComboBox1) 'SE AGREGA EL VALOR DEL COMBOBOX EN LA CELDA INSERTADA

filaCopiar = InputBox("Nº de fila a copiar", "Copiar fila")
If fila = vbNullString Then Exit Sub

[B] [I]Range(Cells(filaCopiar, 3).Address & ":" & Cells(filaCopiar, 6).Address).Select
Selection.Copy
Range(Cells(fila, 3).Address & ":" & Cells(fila, 6).Address).Select
ActiveSheet.Paste
Application.CutCopyMode = False
rango0 = Cells(filaCopiar, 3).Address & ":" & Cells(filaCopiar, 6).Address
rango1 = Cells(fila, 3).Address & ":" & Cells(fila, 6).Address
Range(rango1).Value = Range(rango0).Value
[/I][/B]End Sub

[/CODE]

Espero que pueda servirte,

Juan.

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.