Hola Grupo! , saludos,
Uso esta macro para comparar dos columnas ,una se selecciona
manualmente y otra se establece en la variable CompareRange. Luego
coloca las coincidencias en otra columna "Then x.Offset(0, 7) "
Como este rango ['Set CompareRange = Range("B1:B500")] va aumentando ,
se podría establecer por código la última celda no vacia B1:--
BXXX ,?
Es que no consigo encajar la caracteristica End(xlDown)
Muchas gracias por la ayuda
Sub Find_Matches()
Dim CompareRange As Variant, x As Variant, y As Variant
' Set CompareRange equal to the range to which you will
' compare the selection.
'Set CompareRange = Range("B1:B500")
' NOTE: If the compare range is located on another workbook
' or worksheet, use the following syntax.
'
' Loop through each cell in the selection and compare it to
' each cell in CompareRange.
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 7) = x
Next y
Next x
End Sub
Leer las respuestas