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.

Validacion de rangos de celdas

publicado

Hola a todos, gracias por tomarse la molestia de leer mi caso.

La cuestion es la siguiente, intento hacer la siguiente validacion:

If Range("W" & i & ":AP" & i).Value = Range("A" & j & ":T" & j).Value Then
Range("A" & j & ":T" & j).Select
Selection.Interior.ColorIndex = 3 ' Color fondo
Exit For
End If[/CODE]

pero me marca el siguiente error:

"Se ha producido un error '13' en tiempo de ejecucion: No coinciden los tipos", me podrian decir cual es mi error!!!

Gracias anticipadas!!!

Featured Replies

publicado

De momento, en lo que pones aquí, falta el inicio y final de una estructura For....Next que seguramente definirá las variables i y j.

Es decir, ese código es incompleto.

Saludos.

publicado
  • Autor

Asi es, aqui la estrructura completa:

    For i = 6 To 9
Set rango1 = Range("W" & i & ":AP" & i)
If Not IsEmpty(rango1) Then
For j = 3 To Fila_Final
Set rango2 = Range("A" & j & ":T" & j)
If rango1 = rango2 Then
Range("A" & j & ":T" & j).Select
Selection.Interior.ColorIndex = 3 ' Color fondo
Exit For
End If
Next j
End If
Next i[/CODE]

Gracias por contestar!!!

publicado

Tu error aparte de que le falta el bucle es que estas dándole valor a un rango Range("W" & i & ":AP" & i).Value es como decir que el rango("b10:d10")-value= "a" esto quiere decir que b10 tiene el valor de "a", c10 tiene el valor de "a" y d10 tiene el valor de "a".

Hola a todos, gracias por tomarse la molestia de leer mi caso.

La cuestion es la siguiente, intento hacer la siguiente validacion:

If Range("W" & i & ":AP" & i).Value = Range("A" & j & ":T" & j).Value Then
Range("A" & j & ":T" & j).Select
Selection.Interior.ColorIndex = 3 ' Color fondo
Exit For
End If[/CODE]

pero me marca el siguiente error:

"Se ha producido un error '13' en tiempo de ejecucion: No coinciden los tipos", me podrian decir cual es mi error!!!

Gracias anticipadas!!!

publicado
  • Autor

sebastiani tecomento que puse el bucle completo:


For i = 6 To 9 Set rango1 = Range("W" & i & ":AP" & i) If Not IsEmpty(rango1) Then For j = 3 To Fila_Final Set rango2 = Range("A" & j & ":T" & j) If rango1 = rango2 Then Range("A" & j & ":T" & j).Select Selection.Interior.ColorIndex = 3 ' Color fondo Exit For End If Next j End If Next i[/CODE]

Si notas hice unos cambion y no uso la funcion ".value", pero me sigue botando el mismo error!!

[color=blue]- - - - - Mensaje combinado - - - - -[/color]

NO queria hacer esto pero en vista del exito no obtenido el codigo me quedo asi:

[CODE]
For i = 6 To 9
If Not IsEmpty(Range("W" & i & ":AB" & i)) Then
For j = 3 To Fila_Final
If Range("W" & i) = Range("B" & j) Then
If Range("X" & i) = Range("C" & j) Then
If Range("Y" & i) = Range("D" & j) Then
If Range("Z" & i) = Range("E" & j) Then
If Range("AA" & i) = Range("F" & j) Then
If Range("AB" & i) = Range("G" & j) Then
If Range("AE" & i) = Range("J" & j) Then
Range("A" & j & ":T" & j).Select
Selection.Interior.ColorIndex = 3 ' Color fondo
Exit For
End If
End If
End If
End If
End If
End If
End If
Next j
End If
Next i
[/CODE]

Se siguen aceptando ideas, para reducir el codigo, gracias!!!!

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.