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.

dejar un solo numero de los que se repiten

publicado

como puedo modificar este codigo para que me deje un numero de los que se repiten

Sub Eliminar_repetidos()
Dim Mat, Q%, i%, R%, j%, Dic, Rng As Range, Valor, iniTime!
iniTime = Timer
Set Dic = CreateObject("Scripting.Dictionary")
Mat = Range("A1:SX42"): Q = UBound(Mat): R = UBound(Mat, 2)

For i = 1 To Q
  For j = 1 To R
    Valor = Mat(i, j)
    If Valor <> Empty Then
      Select Case Dic.Exists(Valor)
        Case True
          Set Rng = Union(Dic(Valor), Cells(i, j))
        Case False
          Set Rng = Cells(i, j)
      End Select
      Set Dic(Valor) = Rng
    End If
  Next
Next

Application.ScreenUpdating = False
For Each Valor In Dic.Keys
  If Dic(Valor).Count > 10 Then Dic(Valor).ClearContents
Next
Application.ScreenUpdating = True

MsgBox "Proceso terminado en " & Round(Timer - iniTime, 3) & " seg."
End Sub
 

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.