Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/05/2010, 04:50
Pedro11111
 
Fecha de Ingreso: octubre-2009
Mensajes: 10
Antigüedad: 14 años, 6 meses
Puntos: 0
Seleccionar diferentes rangos de celdas en una macro

Hola, buenos días,

tengo el siguiente código:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application. EnableEvents = False
If Not Intersect(Target, Me. Range("A1:A10")) Is Nothing Then
With Target
If IsNumeric(. Value) Then
. Value = (Int(. Value) + (. Value - Int(. Value)) * 100 / 60) / 24
. NumberFormat = "hh:mm"
End If
End With
End If

Ws_exit:
Application. EnableEvents = True
End Sub


El rango de celdas seleccionado en el código es

A1:A10

y necesitaría poder seleccionar rangos diferentes... B1:B2O, D2:D21 Y H1:H20 y otros.

He hecho varias pruebas e intentos, pero sin resultado favorable.

¿Cómo podría hacerlo?


Muchas gracias.

Saludos.