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 datos copiados al principio de la lista de base de datos y que no guarde los datos en cero

publicado

hola buen dia. quisiera ayuda en este proyecto para guardar datos en rangos diferentes de celdas y que al guardar los coloque al inicio de la base datos y no al ultimo como lo hace ahora 

esta es la macro

 
Sub GUARDAR_DATOS()

Dim NombreHoja As String
Dim HojaDestino As Range
Dim NuevaFila As Integer
Dim FilasFactura As Integer
Dim i As Integer
Dim j As Integer
Dim NumFactura As Integer

NombreHoja = "VENTAS"
FilasFactura = Application.WorksheetFunction.CountA(Range("factura[CODIGO]"))

NumFactura = ThisWorkbook.Sheets("Factura").Range("c5").Value


With ThisWorkbook.Sheets(NombreHoja)
For i = 1 To FilasFactura

Set HojaDestino = ThisWorkbook.Sheets(NombreHoja).Range("a1").CurrentRegion
NuevaFila = HojaDestino.Rows.Count + 1
.Cells(NuevaFila, 1) = Range("c1").Value
.Cells(NuevaFila, 2) = Range("c2").Value
.Cells(NuevaFila, 3) = Range("c4").Value


For j = 1 To 8
          .Cells(NuevaFila, j + 3).Value = ThisWorkbook.Sheets("Factura").Cells(8 + i, 1 + j)
         
           
         
Next j
Next i
End With
MsgBox "registro guardado"

End Sub
 
 
Gracias , por su ayuda!!!!!
 
 

Featured Replies

  • 2 weeks later...

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.