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.

Adaptar macro para trabajar con rango seleccionado por usuario

publicado

Estimados Amigos,

 

Buenos días, tengo el siguiente libro que realiza un procedimiento basado en buscar la última fila con información y recuperar el rango en la columna E. Me gustaría poder trabajarlo únicamente con un rango seleccionado, es decir, que cuando ejecute la macro no lo haga para todo el rango si no para el rango que seleccioné. Alguien me podría dar una mano por favor.

Gracias.

libropruebas.xlsm

Featured Replies

publicado

@Luis Antonio Torres , una solución sería:

Sub ConcatenaColumnaS2()
Dim numzeros As String
Dim Ultima As String
Dim rng As String
Dim cel As Range

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False


numzeros = "0000000000"
Range("A:D").NumberFormat = "@"
Range("E:E").NumberFormat = "dd/mm/yyyy"

rng = InputBox("Elegir rango", "Elija el rango en formato XX:YY")

For Each cel In Range(rng)
cel.Offset(, -4) = Format(cel, "yyyy") & Format(cel, "mm") & Format(cel, "dd") _
    & Left(numzeros, 10 - Len(cel.Offset(, 3))) & cel.Offset(, 3) _
    & Left(numzeros, 10 - Len(cel.Offset(, 4))) & cel.Offset(, 4) _
    & cel.Offset(, 5) _
    & cel.Offset(, 6)
    
    cel.Offset(, -3) = cel.Offset(, 2) & cel.Offset(, 6)
       
Next cel

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False

End Sub

 

Editado el por Haplox

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.