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.

Evitar bucle infinito

publicado

Tengo 10 filas en las que quiero agrupar unos 1000 valores en grupos mas o menos uniformes de 100, pero no siempre va ser posible porque a veces un mismo valor se repite supongamos unas 200 veces. Yo tengo una macro para cada fila que es algo como esto los valores alto y bajo dependen si hay mas de 125 y menos de 75, pero si tengo 200 nunca va saltar "bien" y la macro se queda en el mismo punto

Sub Porcentajes()
Do
If Range("af24").Value = "Bajo" Then
Range("ao24").Copy
Range("u24").PasteSpecial xlPasteValues
End If
If Range("af24").Value = "Alto" Then
Range("an24").Copy
Range("u24").PasteSpecial xlPasteValues
End If
Loop Until Range("af24").Value = "Bien"
End Sub
[/CODE]

Estuve viendo que hay una forma de evitar eso y ponian esto pero no se como aplicarlo en mi macro

[CODE]Sub exitDoExample()
Dim counter As Integer = 0
Dim number As Integer = 8
Do Until number = 10
If number <= 0 Then Exit Do
number -= 1
counter += 1
Loop
MsgBox("The loop ran " & counter & " times.")
End Sub[/CODE]

Desde ya muchas gracias

Featured Replies

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.