Necesito restringir el ingreso de datos a la macro si los mismo ya fueron incluidos
Necesito restringir el ingreso de datos a la macro si los mismo ya fueron incluidos.
Tengo una macro y necesito que el a la hora de ingresar el dato me diga si ya esta incluido y que salga la leyenda "data duplicado".
Adjunto macro:
Sub DATOS()
'
' DATOS Macro
'
'
Sheets("DATOS").Select
Range("A1").Select
End Sub
Sub REGISTRO()
'
' REGISTRO Macro
'
'
Application.ScreenUpdating = False
Sheets("REGISTRO").Select
Range("C6").Select
End Sub
Sub GUARDAR()
'
' GUARDAR Macro
'
'
Application.ScreenUpdating = False
Sheets("DATOS").Select
Rows("6:6").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Sheets("REGISTRO").Select
Range("C6:C11").Select
Selection.Copy
Sheets("DATOS").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Range("A6").Select
Sheets("REGISTRO").Select
Range("C6").Select
ActiveCell.FormulaR1C1 = ""
Range("C7").Select
ActiveCell.FormulaR1C1 = ""
Range("C8").Select
ActiveCell.FormulaR1C1 = ""
Range("C9").Select
ActiveCell.FormulaR1C1 = ""
Range("C10").Select
ActiveCell.FormulaR1C1 = ""
Range("C11").Select
ActiveCell.FormulaR1C1 = ""
Range("C6").Select
ActiveWorkbook.Save
Application.ScreenUpdating = True
End Sub