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.

Error 13 "No coinciden los tipos" Excel 2007 Visual Basic

publicado

Amigos, la siguiente macro se ejecuta perfectamente, pero al terminar de ejecutarse aparece Error 13 "No coinciden los tipos", no he podido encontrar la solución. Alguien me puede ayudar? (Ya probé instalando el Hotfix KB983246). Saludos......................................................................................................................................................................Sub Tramos()

'Borrar Datos Anteriores

'****************************************************

Range("L4:M175").Select

Selection.ClearContents

Range("L4").Select

'****************************************************

Dim m, j As Double

Dim p, n, u, r, t, k, w As Integer

w = Cells(1, 10)

r = 4

t = 5

Cells(r, 12) = Cells(r, 8)

Cells(r, 13) = Cells(r, 9)

For u = 1 To 100

j = Cells(r + 1, 8) - Cells(r, 8)

k = Fix(j / w)

If j > w Then

n = 1

For p = 1 To k

Cells(t, 12) = Cells(r, 8) + w * n

m = (Cells(r + 1, 9) - Cells(r, 9)) / (Cells(r + 1, 8) - Cells(r, 8))

Cells(t, 13) = m * w * n + Cells(r, 9)

n = n + 1

t = t + 1

Next p

Cells(t, 12) = Cells(r + 1, 8)

Cells(t, 13) = Cells(r + 1, 9)

t = t + 1

Else

Cells(t, 12) = Cells(r + 1, 8)

Cells(t, 13) = Cells(r + 1, 9)

t = t + 1

End If

r = r + 1

Next u

End Sub

Featured Replies

publicado

Hola ssabando,

No me da error, tampoco sé con qué datos trabaja la hoja en cuestión, si subes un pequeño ejemplo mejor.

Prueba a declarar cada variable con su tipo, no se si sabes que al hacer dim a,b as integer, a es variant y b es integer, igual no te sirve de nada pero lo mejor es tenerlo todo correcto para ir acotando el error.

publicado

Este error es producido, en el 99% de los casos, cuando en una operación aritmética alguno de los componentes de dicha operación contiene datos no numéricos.

Ejecuta la macro en modo interrupción, F8 de forma repetida, hasta dar con la línea que produce el error.

Al publicar tu consulta has tenido que ver la indicación de que es obligatorio adjuntar un archivo.

Tenlo en cuenta para la próxima vez o tu consulta puede ser eliminada sin mas.

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.