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.

Evitar Duplicación de Datos, de cualquier columna

publicado

Buen día Señores del Foro

Estoy utilizando la formula =CONTAR.SI($D:$D;D716)=1, de tal manera a evitar duplicidad de Datos, me funciona cuando quiero ingresar manualmente, pero tengo un CommandButton1 (GRABAR), en la misma hoja, que es para grabar nuevos registros, y la formula no controla en ese caso la duplicidad de Datos, me gustaría se a través de macro o formula que sea controlada la duplicidad.. mismo que se quiera introducir Datos manualmente o a través del Botón Grabar, particularmente los Datos de la columna "D" .. que no deben repetirse..

Adjunto Planilla

Evitar Duplicacion.xlsm

Featured Replies

publicado

Hola

Prueba así:

Private Sub CommandButton1_Click()

uf = Range("D" & Rows.Count).End(xlUp).Row + 1
reg = Application.CountIf(Range("D:D"), Range("I3"))

If reg Then
    VBA.MsgBox "El registro " & Range("I3") & _
    " ya existe", vbCritical, "AyudaExcel"
Else
    Range("I3:L3").Copy Range("D" & uf)
    Range("D" & uf).Select
End If

End Sub

 

Saludos 

publicado
  • Autor

Sr. Gerson Pineda

Una ves mas gracias por su tiempo y paciencia, esta perfecto

Damos por concluido este tema

Saludos

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.