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.

Macros.... Mejorar tiempos....

publicado

HOLA A TODOS...

ME PUEDEN AYUDAR A MEJORAR LA SIGUIENTE MACROS...... YA QUE SI BIEN ENTREGA EL RESULTADO... ES MUY LENTA.... LA IDEA ES DETECTAR LOS REGISTROS QUE SE REPITEN ENTRE LAS COLUMNAS A Y B :

Sub conciliacion()

Dim conta As Integer

Dim veces As Integer

Dim fila As Integer

Dim col As Integer

Dim valor1 As Variant

veces = 1

While veces < 3

If veces = 1 Then

col = 4

Range("A2").Select

Else

col = 7

Range("B2").Select

End If

fila = 2

conta = 1

valor1 = ActiveCell.Value

While ActiveCell.Value <> 0

If ActiveCell.Offset(1, 0).Value <> valor1 Then

Cells(fila, col).Value = valor1

Cells(fila, col + 1).Value = conta

fila = fila + 1

ActiveCell.Offset(1, 0).Select

valor1 = ActiveCell.Value

conta = 1

Else

conta = conta + 1

ActiveCell.Offset(1, 0).Select

End If

Wend

veces = veces + 1

Wend

'RUTINA QUE EVALUA LAS DIFERENCIAS (se debe ajustar el rango que en el ejemplo va de F2 a F13 y en la segunda va de I2 a I13)

Range("F2").Select

ActiveCell.FormulaR1C1 = _

"=+IF(ISNA(VLOOKUP(RC[-2],R2C7:R13C8,2,FALSE)),0,VLOOKUP(RC[-2],R2C7:R13C8,2,FALSE))"

Range("F2").Select

Selection.AutoFill Destination:=Range("F2:F13"), Type:=xlFillDefault

Range("F2:F13").Select

Range("I2").Select

ActiveCell.FormulaR1C1 = _

"=+IF(ISNA(VLOOKUP(RC[-2],R2C4:R13C5,2,FALSE)),0,VLOOKUP(RC[-2],R2C4:R13C5,2,FALSE))"

Range("I2").Select

Selection.AutoFill Destination:=Range("I2:I13"), Type:=xlFillDefault

Range("I2:I13").Select

End Sub

MUCHAS GRACIAS.

JUAN IGNACIO

Featured Replies

publicado

Si Adjuntas el archivo de ejemplo me parece que sería más fácil que alguien te ayude.

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.