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.

cambiar linea de codigo

publicado

hola buenas tardes quisiera saber como puedo ejecutar este codigo cambiandole esta linea 

Sheets("santander").Select

por hoja activada o la hoja seleccionada

el codigo completo es este

Sub buscaCuadro()
Dim nrop As String
'busca la combinación de nros en los cuadros de pista
Set hopi = Sheets("pista")
Sheets("santander").Select

'limpiar pista de colores anteriores     'opcional
hopi.Range("E2:AV40").Interior.PatternColor = xlNone

'se recorre col AP de hoja resultado
For x = 2 To Range("AL" & Rows.Count).End(xlUp).Row
    nrop = Range("AL" & x)
    For i = 2 To 35             'filas
        For j = 5 To 38 Step 5  'col
        If hopi.Cells(i, j) = Val(Left(nrop, 1)) And hopi.Cells(i, j + 1) = Val(Mid(nrop, 2, 1)) And hopi.Cells(i, j + 2) = Val(Mid(nrop, 3, 1)) And hopi.Cells(i, j + 3) = Val(Mid(nrop, 4, 1)) Then
            filx = i: colf = j
            hopi.Range(hopi.Cells(i, j), hopi.Cells(i, j + 3)).Interior.ColorIndex = 6
            Exit For
        End If
        Next j
        If hopi.Cells(i + 1, 5) = "" Then i = i + 2
    Next i
Next x
End Sub
 

Featured Replies

publicado

Hola, si la macro se va a ejecutar siempre en la hoja activa, simplemente borra esa línea del código

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.