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.

Macro para generar código numérico correlativo

publicado

Buenos días, tengo una planilla en la cual estoy trabajando con la siguiente MACRO

Sub Genera()
Dim numConsec As Long
Dim strConsec As String
Range("M1").Select
Selection.NumberFormat = "@"
If IsEmpty(ActiveCell) Then
Range("M1").Value = "00001"
Else
numConsec = Val(Range("M1").Value) + 1
strConsec = Right("00000" & Trim(Str(numConsec)), 5)
Range("M1").Value = strConsec
End If
End Sub

Mi consulta es como puedo hacer para que esta MACRO funcione en todas las hojas del LIBRO(5 hojas, con posibilidad de incrementar), es decir si en la hoja 1 se uso el numero 00001, en la hoja 2 si se ejecuta la MACRO se use el 00002, si vuelvo a la hoja 1 y ejecuto la MACRO se visualice el 00003.

Saludos

Y desde ya muchas gracias

Featured Replies

No hay posts para mostrar

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.